Use a separate function that can be reused and also get rid of
the large output_data array and strcat without length
checking. We will use GString instead.
(cherry picked from commit 9c2451d813)
This removes some flawfinder warnings by not using a fixed
size array and using g_snprintf instead of g_sprintf and
using more safety checks.
(cherry picked from commit c2fa21ac7d)
There was a lot of duplicate code based on
whether or not value was NULL with for
some tags partially unreachable code.
We combine the parts and only test
value for NULL where needed.
Also rename the typos in enum
COL_REGSITRY_* to
COL_REGISTRY_*
(cherry picked from commit 0a0eeac1ad)
There's a lot of duplicate code for adding string values
to the gui (liststore). This is another part of trying
to reduce that.
Besides that the copying code uses fixed size arrays
without length checking as pointed out by flawfinder.
We will instead use a function add_to_store to add a
comma or semicolon separated list of values stored in
value to add rows with values to the gui.
(cherry picked from commit e24a6dc8d6)
Crop tool used stale color / pattern values when performed crop with
'Allow growing' option. Its context was not notified when fg/bg/pattern
value was changed.
Closes: #4103
GLib has been fixed with commit 00e848fbc.
Add it in our patch list for the Windows installer until we get a
release containing the patch.
(cherry picked from commit 106e13d5db)
Only count a broken line once and only stop after at
least 10 consecutive broken lines since older fax
images are known for having bad lines.
This enables loading the image in issues #475.
(cherry picked from commit fd2aa645af)
- Miniswhite and Minisblack TIFF images with bps 1, 2 and 4 were loaded as
indexed. We change this to grayscale since that's what they are.
- Fix not handling of miniswhite for 8 bps.
Fixes issue #1838 Tiff image display wrong (tiff tags not interpreted), black
line instead of white line.
Fixes issue #2680 Failure to load 4-bit grayscale TIFF layers.
(cherry picked from commit a6d4ef8b94)
# Conflicts:
# plug-ins/file-tiff/file-tiff-load.c
Without the proper button response associated, we don't have the right
button order, as standardized by various desktops.
(cherry picked from commit 9893f60d8c)
Improved and added a few error messages and made all
user visible messages (g_message) translatable.
(cherry picked from commit 20cedd4c0c)
# Conflicts:
# plug-ins/file-tiff/file-tiff-load.c
Testing some fuzzed TIFF images from the imagetestsuite
revealed we should add some more checks for valid input
and function returns.
We now stop whenever the reported bps is above 64.
Even if it is valid we can't handle it anyway and I'm not
aware of any actual valid image like that.
Make sure the image dimensions are valid and in the range
that GIMP can handle.
Return directly when TIFFReadRGBAImage fails instead
of doing further processing and improve the error message.
Check result of TIFFReadTile and return if it fails.
(cherry picked from commit 2ff9ccf46c)
Certain broken tiff fax images can cause a huge amount of warnings
which on Windows eventually causes GIMP to run out of resources
and then crash.
Since the avarage user won't have much use for these warnings
let's just only send them to stderr.
(cherry picked from commit 97739af643)
Check at runtime for the operation availability and set the "Show Image
Graph" action active depending on this check.
This goes with discussions to make this operation optional with a
runtime check for the tool `dot`.
See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/84
Was caused by widget tool fixed_center_x and fixed_center_y coordinates set to
coordinates of mouse click instead of rectangle center after converting channel
selection bbox to rectangle.
Now rectangle fixed_center_x and fixed_center_y coordinates are always updated
when tool widget x1, x2, y1, or y2 coordinates are updated.
Closes#6487
(cherry picked from commit 6959426603)