Commit Graph

44949 Commits

Author SHA1 Message Date
7449594336 app: check for invalid offsets when loading XCF files
More safety checks for detecting broken xcf files, also based on examining
issue #8230.

After reading an offset where layer, channel, etc. data is stored, we
add a check to make sure that offset is not before where we read the
offset value. Because the data is always written after the offset that
points to it.

(cherry picked from commit a842869247)
2022-06-05 18:55:26 -04:00
e7d4b580e5 app: check max dimensions when loading xcf files
Improvements in loading broken xcf files, based on examining issue #8230.
Besides checking for a minimum width and height, GIMP also has a maximum
size we can and should check.

In the case of the image itself, we change invalid dimensions to a size of
1 in hope that the individual layers etc will have the correct size.
For layer, we will also try to go on, but for channel and layer mask, we
will give up.

(cherry picked from commit 24c962b95e)
2022-06-05 18:55:16 -04:00
6ab90ecbbd app: fix #8230 crash in gimp_layer_invalidate_boundary when channel is NULL
gimp_channel_is_empty returns FALSE if channel is NULL. This causes
gimp_layer_invalidate_boundary to crash if the mask channel is NULL.

With a NULL channel gimp_channel_is_empty should return TRUE, just like
the similar gimp_image_is_empty does, because returning FALSE here
suggests we have a non empty channel.

(cherry picked from commit 22af0bcfe6)
2022-06-05 18:54:20 -04:00
5f4eea011b Update Swedish translation 2022-06-05 22:11:22 +00:00
072bb68039 Update Swedish translation 2022-06-05 20:00:22 +00:00
3a22719e68 plug-ins: fix #4492 Add export options
Adds a new option to flip the image on export. This allows for
direct imports into certain DirectX engines without altering the
project file. It also adds a new option to save all visible layers on
export, again to avoid altering the user's project file.
2022-06-05 18:19:59 +00:00
8ac561458f plug-ins: Issue #6753 Add toggle for metadata
Backports option from master to toggle whether IPTC and thumbnails
are saved on export. Note that in webp format, IPTC data is saved
via XMP, so if XMP is not saved, IPTC option is deactivated.
2022-06-05 17:22:51 +00:00
90f5ce7863 NEWS: update. 2022-06-05 13:52:21 +02:00
300905ee50 Update Georgian translation 2022-06-05 06:07:00 +00:00
17fd249394 JPEG XL import support
JXL import is backported from GIMP 2.99
Added .jxl association for Windows installer
It was necessary to adjust plugin-defs.pl for HEIF plugin,
because necessary dependencies were missing there.
2022-05-31 18:23:50 +02:00
e0cd10092b Update German translation 2022-05-29 05:07:44 +00:00
d9c9ef7902 app: fix #6961 Scaled image bug
With large image sizes a 32-bit int is not enough for the intermediate
computations, which byte per pixel, width and height are.

So, just like the function below it does: gimp_gegl_pyramid_get_memsize,
we will cast these to gint64.

Thanks to Massimo Valentini for finding the cause.

(cherry picked from commit ba841a98da)
2022-05-28 12:17:30 -04:00
d0a6067fbb Update Catalan translation 2022-05-27 07:40:33 +02:00
919c3ffa91 Update Spanish translation 2022-05-25 12:25:29 +00:00
689b6cb9fd Update Turkish translation 2022-05-24 07:44:51 +00:00
1cd45a7c2e Update Turkish translation 2022-05-24 07:40:50 +00:00
25ce20c4bd Update Chinese (China) translation 2022-05-23 22:14:58 +00:00
4aeaedd3a4 Update Slovenian translation 2022-05-23 15:38:04 +00:00
a742bc1b30 Update Polish translation 2022-05-22 14:58:27 +02:00
5fb8cf568b MR !160: Arguments in wrong order 2022-05-22 10:26:19 +00:00
973963ff76 NEWS: update. 2022-05-19 11:34:24 +02:00
faf4d5ee9b Update Swedish translation 2022-05-18 22:11:56 +00:00
48daf4a635 Update Portuguese translation 2022-05-18 14:34:26 +00:00
4958a2bc54 Update Ukrainian translation 2022-05-18 06:22:13 +00:00
c51e5cbafa (Backport) Issue #4: Enable loading transparent .EPS files 2022-05-17 22:06:44 +00:00
db236dcff8 plug-ins: remove unnecessary Windows specific code in tinyscheme
Removal of the snprintf define was also part of the UCRT Windows patch
in MINGW. Although it builds fine without this change, there is no need
anymore to redefine snprintf. In addition, I seem to remember that
_snprintf had a shortcoming.

So let's remove the Windows specific code, since it works fine without it.

(cherry picked from commit e268d38fb1)
2022-05-17 17:25:10 -04:00
08ba94c652 plug-ins: fix Windows build in UCRT environment
The UCRT environment is a successor to the MINGW environment on Windows
with a more modern C runtime library.
Building under UCRT we get this error:
../../gimp/plug-ins/file-raw/file-darktable.c:420:7: error:
 function '__p__environ' is initialized like a variable"

To fix this we use the relevant part of patch 6 from:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-gimp

(cherry picked from commit ef817dc452)
2022-05-17 17:24:58 -04:00
bb76dad358 plug-ins: fix #1351 Raw Data Import Creates Blank/White Image...
when Offset and Dimensions Bigger than File Size.

If we didn't read the exact amount of bytes, the whole image would be
filled with white.

Let's change this, so we read as much bytes as we can, and fill the rest
with white.

(cherry picked from commit 3644b9010a)
2022-05-16 14:01:18 -04:00
8089a4f8c4 Update Russian translation 2022-05-15 14:17:19 +00:00
56ba6f8e30 Update Polish translation 2022-05-15 14:16:14 +02:00
9dec273d21 Update Slovenian translation 2022-05-11 09:58:03 +00:00
626a485fdf Update Portuguese translation 2022-05-10 21:13:48 +00:00
2111dc38fd Update Spanish translation 2022-05-10 13:07:46 +00:00
d30af62635 Update Ukrainian translation 2022-05-09 20:05:31 +00:00
493e598553 Update Swedish translation 2022-05-09 18:19:14 +00:00
5a840723a2 plug-ins: sync the BigTiff warning as in the main dev branch. 2022-05-09 19:43:48 +02:00
9b807a09b4 plug-ins: Port BigTIFF save option from dev 2022-05-09 16:58:54 +00:00
bfc59da987 Cppcheck fixes
(cherry picked from commit 3e35fe4d80)

# Conflicts:
#	app/widgets/gimpcolordialog.c
#	libgimpwidgets/gimpchainbutton.c
2022-05-06 15:10:06 -04:00
dda9339969 Update Russian translation 2022-05-05 13:04:29 +00:00
8cd6d05232 app: fix #8120 GIMP 2.10.30 crashed when allocate large memory
GIMP could crash if the information regarding old path properties read
from XCF was incorrect. It did not check if xcf_old_path succeeded and
kept trying to load more paths even if the last one failed to load.

Instead we now stop loading paths as soon as that function fails.
In case we have a failure here we also try to skip to the next property
based on the size of the path property, in hopes that the only problem
was this property.

(cherry picked from commit 4f99f1fcfd)
2022-04-29 16:44:23 -04:00
6c7da6729a plug-ins: fix #3964 Incorrect position when printing
This was a long standing issue where the image was not printed at the
position as selected in our print preview.

The problem being that we do not take into account the dpi of the print
context we are printing to, but instead always assumed 72.
This is the fix that was suggested by Massimo.

(cherry picked from commit 0e462440cc)
2022-04-29 13:01:25 -04:00
520835ede4 icons: Issue #4095. Add a thin contrast border for 'close' and 'detach' color theme icons…
…to improve their readability against dark backgrounds on mouse-hover.

Resolves: #4095 (GNOME gitlab tracker)
2022-04-26 23:56:38 +06:00
b0ca7ff065 themes: Issue #4095. Add a on-hover effect to the menu-item …
… radio buttons to improve their readability against dark backgrounds.

Dark theme only.
2022-04-26 23:55:21 +06:00
96edeb02a4 plug-ins: fix integer overflow in print-draw-page.c
As mentioned by Massimo in issue #6618, part of the problem there is an
integer overflow when using large size images when computing the offset
in pixels.

Let's fix our part of the problem by casting to guint64.
Besides that, also use casts to correctly compute progress for very
large images.

(cherry picked from commit cd4401fee4)
2022-04-25 14:24:09 -04:00
f7e7f396aa libgimpcolor: fix call to cmsCreateProofingTransform().
Wrong argument order! See Little-CMS API.

(cherry picked from commit 1a840b8e18)
2022-04-24 21:22:25 +02:00
8e058220e5 Update Russian translation 2022-04-24 16:36:44 +00:00
0af9be50ad Update Catalan translation 2022-04-21 22:48:08 +02:00
8ff3b8a68a Update Russian translation 2022-04-17 18:47:04 +00:00
abbe29d754 Update Icelandic translation 2022-04-12 13:27:32 +00:00
08ffe4ae06 Update Icelandic translation 2022-04-12 13:15:10 +00:00