Resolves#9545
When exporting a JPEG as CMYK, it is possible for the
"Save Profile" metadata option to be unchecked. This causes
the image to be saved without its CMYK profile, resulting in an
incorrect image rendering.
As this is almost never the desired case, this patch changes the
export logic to always save the profile IF the user has requested
CMYK export and a CMYK profile is attached.
Additionally, this patch fixes an issue in the export dialog where
the DCT options are shown as a radio frame instead of a combobox
as in GIMP 2.10.
Reported as ZDI-CAN-28874.
For psp images with bit depth 1 or 4 bits and small widths, it was
possible to overflow the buffer because these bit depths are stored
in multiples of 4 bytes per line.
Because these formats are converted to regular RGB, this means that for
small widths, more bytes are needed than expected when we are upscaling
to 8-bit.
To fix this, we compute the line size when depth < 8, and adjust
line width if that value is larger.
Found all now unused blurbs with:
for macro in `grep -rI '^#define \([A-Z0-9_]*\)' app/config/gimprc-blurbs.h | sed 's/#define \([A-Z0-9_]*\).*$/\1/'`; do
grep -rIq "$macro" * --exclude=gimprc-blurbs.h;
if [ $? -ne 0 ]; then
echo $macro;
fi;
done
Only exception was LAST_REVISION_BLURB, which was not used, but should
have been.
Per discussions with Pippin, Linear as default may not be the most
expected, though it has scenarios where it is still better.
Curves is easier because it was not possible to call it through the API
at all in the 3.0 series. I'll verify a bit for Levels, but I may just
do a GUI-only change for this one.
I don't get how this could be failing because config.h is included on main.c,
but it it: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/2664#note_2699194
So, I noticed that that the macro prefix ISOCODES_ is "new", being introduced
with aba7316e. The pre-existing is ISOE_CODES. Let's unify trying to fix build.
Though my previous commit is not absolutely wrong (so I'll leave it in;
it does make sense that we don't set any lock actions as ACTIVE when
there are no items), this new commit is actually the real issue. The
previous commit was getting rid of the extra lock actions, but I
realized that the "edit-undo" action was made insensitive too.
This is because in multi-window mode, a flush was updating all action
groups for the visible image of all opened windows (in single window
mode too, but there is only 1 window, hence only 1 visible image, so no
bug happening). Depending on order of these updates, we could end up
updating actions based on items or undo stack of a non-active image. And
worse, this could even affect the active image itself (which was what
was happening with the locks).
Reported as ZDI-CAN-28807
With large row and column sizes 32-bit int values are not large
enough to hold the product and thus can cause overflow.
While we are at it, we not only fix the location from the report, but
also other occurrences that could overflow.
- We change certain variables to gsize to make sure they can hold a
64-bit value.
- Other intermediate results are promoted to (gsize) to make sure that
the product is computed as gsize.
- Move some i,j variables to the loops where they are used.
Resolves#15971
It was possible to set a XPM image to have a width and/or height
that is larger than what GIMP can create an image for. In addition to
causing gimp_image_new () to fail, it can also lead to buffer overflow
when allocating space to read in the image.
This patch adds a GError parameter to parse_image (), then uses it to
pass up an error for either oversized images or buffer overflows.
Resolves#15968
It is possible to cause a buffer overflow in our ANI
loading code by setting the Name or Artist metadata
files to 0xFFFFFFFF. This patch changes our allocation
code to use g_try_new0 () instead of g_new0 (), and
verifies if it is NULL before trying to read data into it.
Resolves#14966
When "Include mouse pointer" is checked in the Windows
version of the Create Screenshot plug-in, we used the
GetCursor () Win32 API to get the cursor icon. However,
this just returns a generic cursor rather than the current one
used.
This patch changes the code to use the hCursor property of
the CursorInfo struct that was already retrieved, which contains
the current cursor's icon instead of the generic one.
Alx confirms that "Drop shadows, Inner Shadows, and Outer Glow are all
layer styles in Photoshop", which I wasn't certain about (this software
has different concepts for what is basically just effects). So let's
combine in a single item.
While listing the file formats, I could not find the format, because it
was labelled differently.
This doesn't break the strings since the longer string already existed.
It's mostly copy-pasting of dev versions' metadata, with reordering per
category.
I didn't copy features which were backported in the 3.0 series since, or
still in playground, some of the less visible features, what looks a bit
more like fixes than features, regrouped some points when relevant, etc.