Commit graph

56850 commits

Author SHA1 Message Date
Jehan
596044cd18 NEWS: update. 2026-02-13 13:39:17 +01:00
Alx Sa
11f131aa1f widgets: Use 64bit for HistogramEditor counts
Resolves #13014
In GimpHistogramEditor, pixels and counts are stored
as doubles. We previously converted them into 32bit integers
when displaying the values to the user.

As it is possible for the dimensions of an image to exceed the
limit of a 32bit integer, this could lead to overflow and negative
pixel counts.

This patch switches our display code to use 64bit gsize casts
for conversion to prevent this from happening.
2026-02-13 06:17:52 +00:00
Alx Sa
29f991cbf2 libgimpwidgets: Reorder GimpPropToggle docs
The documentation for gimp_prop_toggle_new ()
had "icon_name" and "label" in the wrong order.
This patch fixes the documentation to be consistent
with the API.
2026-02-13 05:29:53 +00:00
Alx Sa
31eb0d86cf core: Associate color profile with SBZ palette
Color profiles were not being correctly connected to
Swatchbooker imported palettes, because the path
was included with the profile name (so a direct comparison
did not match). This patch fixes this by comparing the suffix
instead. It also fixes some minor formatting issues.
2026-02-12 02:07:49 +00:00
Alx Sa
dbc1c55de4 core, dialog: Add Procreate swatches import support
Procreate swatches are zipped JSON files.
They contain an object array of HSB
color palette values. Newer versions of the
format also support different color models,
spaces, and color profiles.

This patch adds support for importing the
palette name, colors, and associated color
profile in the original HSB format.
2026-02-12 01:49:47 +00:00
Alx Sa
9e277c3944 themes: Define some margin-right values
240160f3 added some unintentionally margin-right values
for buttons in GimpSpinScale and the header icons in the
GimpLayerTreeView. This patch adds definitions to those
CSS styles to override the general addition of the 4px
margin-right values.
2026-02-12 01:30:58 +00:00
Bruno Lopes
c3ed54e8d7 build/linux: Build babl relocatable on Snap package
Closes: #14793
2026-02-11 11:12:30 -03:00
Anders Jonsson
9d09a70a58 plug-ins: set_rgba in Fog works on sRGB
In GIMP up to 2.10, the default color for the Fog filter
had linear RGB values (240, 180, 70), (#f0b446).

The set_rgba call that's now in Fog treated these normalized
values as sRGB, resulting in another, lighter color (#f8db8e).

Change to recalculated values from the definition at
https://en.wikipedia.org/wiki/SRGB to get the original color
again.
2026-02-11 13:15:19 +01:00
Bruno Lopes
e5c8b05064 build/linux: Update v7.12.1.tar.gz to 7.12.2 2026-02-11 08:50:26 -03:00
Bruno Lopes
bcb9f5c73a build/linux: Add super-privileged 'personal-files' interface to GIMP snap
See: #15547

This needs approval from Cannonical and allows migrating app data from
older versions as well writting current app data outside the sandbox.
2026-02-10 13:13:29 -03:00
Bruno Lopes
22e9ccf72d build/linux: Support 3P binary plug-ins on AppImage (if linked against Debian)
Closes: #15807 by preloading API-related libraries for 3P plug-ins sake.

This will only work if the .appimage is run normally (without extract), because
when extracted its APPDIR can be placed on dirs with spaces unsupported by LD.

It also requires plug-ins to be built with the Debian used for the AppImage.
But there is nothing new under the sun, this rule is valid for all packages.
2026-02-09 22:36:25 -03:00
Alx Sa
ec1dfb2e0c script-fu: Fix background color in Round Corners
When we call (gimp-context-set-defaults) in the
Round Corners script, we reset the background color
in addition to temporarily clearing out the other
context settings. This results in us always using the
default white background color for the "Add background"
toggle.
This patch saves the background color beforehand and
restores it before creating the background layer, so we
still use the user's preferred color for this layer.
2026-02-09 16:33:47 +00:00
Sveinn í Felli
885c07555d Update Icelandic translation
(cherry picked from commit 828e299347ed15b3433093e70454333c4d112e9e)
2026-02-09 16:15:08 +00:00
Sveinn í Felli
41ac0e5b08 Update Icelandic translation 2026-02-09 15:58:13 +00:00
Jehan
3d707b42e4 libgimpwidgets: have gimp_widget_get_monitor() work on Wayland too.
Our historical heuristic looking for the main monitor based on the
position of the center point in a widget just won't work on Wayland,
where reported positions are always (0, 0). This is the security policy
for this protocol.

Instead we must now use gdk_display_get_monitor_at_window() which is
meant to do the approximation of determining the monitor a surface is
in, for us.

This is one step of implementing color management for Wayland (#15827),
except we still need the code to get the ICC profile of a monitor (but
now at least, we know which monitor we are on).
2026-02-09 14:09:58 +01:00
Alx Sa
f08eff5cda core: Retain SamplePoint modes when copying images
Resolves #15833
When we copied images in
gimp_image_duplicate_sample_points (), we only carried
over their X & Y position, not their pick mode.
This patch adds calls to get the original pick mode and
to set it to the new sample point created in the copied
image.
2026-02-09 12:17:11 +00:00
Marco Ciampa
9ea1b90e45 Update Italian translation 2026-02-08 23:38:15 +01:00
Sveinn í Felli
6bc0c965b9 Update Icelandic translation 2026-02-08 21:38:39 +00:00
Sveinn í Felli
d45b4f1e56 Update Icelandic translation 2026-02-08 17:09:25 +00:00
Sveinn í Felli
0ac4c216b1 Update Icelandic translation 2026-02-08 13:34:57 +00:00
Sveinn í Felli
2221220dbd Update Icelandic translation
(cherry picked from commit 4bbe2291da7ded741f863a8813224cbfe3a1626a)
2026-02-08 13:19:19 +00:00
Sveinn í Felli
258bf43349 Update Icelandic translation 2026-02-08 11:49:31 +00:00
Sveinn í Felli
45fe3f6fac Update Icelandic translation
(cherry picked from commit f3b3df6cf227d39c20ec5be38f0b89b45ac54015)
2026-02-08 11:09:09 +00:00
Sabri Ünal
0351968424 Update Turkish translation 2026-02-08 08:56:57 +00:00
Alx Sa
a4b9e4c4db app: Don't show Welcome Dialog if images loaded...
...on start.
Users who open GIMP with images
(such as via the command line or drag & drop)
may not want the Welcome Dialog to
appear over their image.

This patch moves the check for files to be
above the code that loads the Welcome
Dialog, so that we can pass that information
to gimp_update_auto_check ().
If files are being loaded, we don't display
the Welcome Dialog (with the exception
of on first update, so users don't miss the
update information).
2026-02-08 00:43:36 +00:00
Jacob Boerema
fa0e95941d plug-ins: don't fail loading gflare files with Windows line endings
There was a report on reddit that the flare files on Windows were
stored with Windows (\r\n) line endings and that gradient flare did
not recognize these flare files.

Since these files are text files there is no reason not to accept
windows line endings. To do this, we adjust the header to not include
the line feed and check for the header as a prefix instead of the
whole line including line ending.

Also adjust saving to add the line feed separately.
2026-02-07 13:52:10 -05:00
Jehan
0d59f00b36 gimp-data: bumping again. 2026-02-07 17:50:28 +01:00
Jehan
f2e398df06 NEWS: update. 2026-02-07 16:36:22 +01:00
Jehan
947d42aa27 gimp-data: bump after latest gimp-splash.crop updates. 2026-02-07 16:22:42 +01:00
Jehan
d893aa373d Issue #11642: "images-delete" action not disabled when the selected…
… image's displays change in the Images dockable.
2026-02-07 00:39:12 +01:00
Alx Sa
cfba63a932 core, widgets: Don't remove inactive filters on merge
If a filter is inactive/invisible, it does not
affect the appearance of the drawable.
Therefore, when merging all active filters,
those filters should not be removed.

This patch adds conditional checks for
gimp_filter_get_active () and does not
remove filters on merge if it returns
FALSE. It also adds sensitivity checks in
the GUI so that the merge down button is
not active if there are no visible filters.
2026-02-06 21:50:13 +00:00
Jacob Boerema
02886e626d plug-ins: fix crash due to uninitialized ptr_array...
when loading a specially crafted PSD.
After fixing the issue in the previous commit, using the poc from that
issue, a new issue surfaced where the ptr_array used for
img_a->alpha_name did not contain any names. Trying to access the
first index then caused a crash, because apparently that is only
valid if at least one item has been added.

Let's fix this by only creating the ptr_array when we know for sure
that we are going to add an item.
2026-02-06 16:00:11 -05:00
Jacob Boerema
8cf2772f56 plug-ins: fix #15812 PSD loader: heap-buffer-overflow ...
in fread_pascal_string

In plug-ins/file-psd/psd-util.c, the function fread_pascal_string()
allocates a buffer with g_malloc(len) and reads len bytes from the file
into it. The buffer is not null-terminated, but is assumed to be in
later code.
This causes it to read past the end of its allocated region with a
specially crafted PSD, causing a heap-buffer-overflow.

Fix this by alloocating one more byte than its length and set that
to '\0'.
2026-02-06 15:56:07 -05:00
Jacob Boerema
84fb1b3ce5 plug-ins: Fix #15818 gfig crash and critical when opening saved gfig
When opening a saved gfig file that came with GIMP, I noticed
several criticals:
GEGL-CRITICAL **: 09:16:16.320: gegl_color_get_format: assertion
 'GEGL_IS_COLOR (color)' failed
After that the gfig plug-in crashed.

After examination I noticed that the initial style gets copied. In
the case of the default style this means the source and destination
are the same.
When duplicating our code first removed the GEGL color objects from
the destination style before assigning from the source. But because
they are the same, this leads to invalid colors. Before the change
to GEGL colors they were simple values where reassigning didn't matter,
but here it does.
Since the same function does other assignments with resources that
may cause later issues, let's just return right away if the source
and destination style are the same.
2026-02-06 13:36:46 -05:00
Bruno Lopes
7ac037e346 gimp-data: Bump to fix gimp-splash.crop path for macOS dmg 2026-02-06 14:36:36 -03:00
Bruno Lopes
dbb98d8c83 gimp-data: Bump to generate "fancy" DMG background 2026-02-06 13:24:53 -03:00
Alx Sa
d6dba93bb5 plug-ins: Guard against memory overflow in PSD load
Resolves #15814
As noted by JungWoo Park, since in fread_unicode_string ()
we read in a 32 byte value and then attempt to allocate
double the memory, we run the risk of overflowing and crashing
at g_malloc ().
This patch converts that function to g_try_malloc () and checks
if it returns NULL before going further.
2026-02-06 13:19:45 +00:00
Alx Sa
c9c932a87f tools: Add arrow keys to Flip tool
Per user request, this allows you to flip
on-canvas items with the arrow keys when
the Flip tool is active. Left/right arrow keys flip
horizontally, up/down arrow keys flip vertically.
Note that having an active guide highlighted overrides
this distinction - pressing any arrow key will always flip
over the guide, same as with the mouse.
2026-02-06 04:05:48 +00:00
Bruno Lopes
82cb585308 plug-ins: Do not free null 'urls' array
Closes #15786

While coding this I concluded that urls would never be null,
otherwise the whole utility does not work, but I was wrong.
2026-02-05 15:19:46 -03:00
Bruno Lopes
0fc6baa3df gimp-data: Update for more automated splash crop 2026-02-05 14:46:28 -03:00
Bruno Lopes
95d509f272 build/linux: Update poppler-26.01.0.tar.xz to 26.02.0 2026-02-05 11:49:25 -03:00
YOSHIDA Shigeto
ccdb170348 Update Japanese translation 2026-02-05 12:20:48 +00:00
YOSHIDA Shigeto
27b0124515 Update Japanese translation 2026-02-05 07:36:37 +00:00
YOSHIDA Shigeto
a06121efd6 Update Japanese translation 2026-02-04 14:45:13 +00:00
Jehan
9417565ea2 Issue #15575: add arg to color button prop widget to choose context awareness.
In particular, for indexed images, color choice will happen within the
colormap.

The following uses are made context-aware:

* Test tool options color;
* Fill colors.

These other uses will not be context-aware:

* Padding, quick-mask and padding colors;
* Out-of-gamut colors;
* Generically generated color buttons (e.g. in filter dialogs);
* Foreground selection's mask color;
* Grid colors.
2026-02-03 13:10:41 +01:00
Jehan
c34fe3e94f Issue #15763: disable 2 unit testing files with no replacement.
Looking in these tests, most are hard to test with just the API. These
will need to be properly replaced once we'll make use of a UI testing
framework allowing such tests.
2026-02-03 10:51:00 +01:00
Jehan
608ad0a528 app: new save-and-export tests calling the API with actual GIMP process.
Issue #15763 is again mostly false positive crashes of the unit tests
because the code is only partly GIMP code, arranged differently as what
a full GIMP process would actually do.

The new tests just runs on the real GIMP code. Now the difference is
that we don't test the UI by doing this, but this can be debated whether
the previous tests were actually running on the UI themselves (they were
mostly running some core code directly and sometimes activating some
actions or raising dialogs (gimp_test_utils_create_image_from_dialog()),
but again not by actually clicking or hitting keys as a human would do.

It's not proper UI testing (cf. #9339 of #13376 for further discussions
on this topic).

So in the meantime, let's go with this intermediate step. At least now,
such tests would run actual GIMP code and would catch issues which could
really happen in a GIMP process.
2026-02-03 10:40:15 +01:00
Jehan
fd58ab3bee libgimp: use the file directory as base for pygimp module.
This will allow calling this script from elsewhere.
2026-02-03 10:40:15 +01:00
Marco Ciampa
eab68c443d Updated Italian translation 2026-02-03 09:41:42 +01:00
Yuri Chornoivan
9196d0b74f Update Ukrainian translation 2026-02-03 04:16:44 +00:00