Commit graph

55580 commits

Author SHA1 Message Date
Bruno Lopes
ccde514bdb
libgimp: Output CLI messages to the parent console like Linux and macOS
Closes: #15192 and #7413.

Maybe helps with #3603 too.

Loosely based on https://github.com/endlessm/rufus/blob/master/src/rufus.c

The input is right now clunky, needs to use proper API to halt input and
get CTRL+C in the future, but output on terminal is a big plus that pays off.

(cherry picked from commit 9e795acba7)
2025-10-31 20:49:55 -03:00
Bruno Lopes
720647f8e2
build/windows: Do not build GEGL with Matting Levin due to crashes
Closes: GNOME/gimp#12838
(cherry picked from commit 1d7a9c2d4b)
2025-10-31 19:06:47 -03:00
Jehan
fb1bd439cf
plug-ins: fix memory cleanup.
This issue was raised by Anders in #15152 and it was a mean one, because
it really looked like file-ani-export was crashing inside
_gimp_procedure_config_end_export() (so after its main run function),
but somehow only when being called from another plug-in (in particular
here, from the file-compressor plug-in). So it looked like a bug
somewhere in libgimp.

It turned out to be a "simple" memory corruption which was not
immediately showing its consequences.

(cherry picked from commit 381fad7253)
2025-10-31 19:06:16 -03:00
Martin
6f83dbeb25 Update Slovenian translation 2025-10-31 10:26:45 +00:00
Alx Sa
c08ba69011
app, pdb: fix gimp_drawable_get_sub_thumbnail() on high-bit depth drawable.
Resolves #13598
Applies the same logic designed by Jehan
in f78a0629 to the gimp_drawable_get_sub_thumbnail
function.
This allows GimpZoomPreview and
GimpDrawablePreview in older
plug-ins to show correct previews for
images that are larger than 8-bit.

(cherry picked from commit b420a7738c)
2025-10-30 15:07:03 -03:00
Jehan
1786596675
app, pdb: fix gimp_drawable_get_thumbnail() on high-bit depth drawable.
This bug had several causes:

* gimp_drawable_get_thumbnail_data() is pretty crappy as it just returns
  dimensions and bpp. You get no real format information.
* When using it to create a GdkPixbuf, which seems like the most common
  usage, only sRGB (with or without alpha) in 8-bit is supported by
  GdkPixbuf.

So I'm just making sure that private _gimp_drawable_thumbnail() PDB proc
is only returning 8-bit sRGB(A) data. For thumbnailing, this is probably
fine anyway.

Fixes when calling gimp_drawable_get_thumbnail() on an item from a
high-bit depth image:

> LibGimp-CRITICAL **: 20:12:21.028: file ../../../../../../../dev/src/gimp/libgimp/gimppixbuf.c: line 112 (_gimp_pixbuf_from_data): should not be reached

(cherry picked from commit f78a062950)
2025-10-30 15:06:59 -03:00
Jehan
958d81cf5c
Issue #15179: GExiv2Metadata is not seen as GimpMetadata parent in bindings.
(cherry picked from commit dcec82a6a1)
2025-10-30 11:13:34 -03:00
Jehan
424c70f610
app: also check for an empty name.
I'm looking at #14014. It's probably not the problem either, especially
as gimp_parasite_new() would return a NULL parasite anyway with an empty
name.

But better be thorough and output a sensible error as soon as possible
when loading a XCF.

(cherry picked from commit d320b85115)
2025-10-28 12:19:29 -03:00
Jehan
df61581aee
Issue #14014: fix removing parasite using already freed parasite's name.
gimp_image_set_simulation_intent() attachs a "image-simulation-intent"
parasite which means that it first detaches and frees the one which was
deserialized from the XCF. When calling gimp_parasite_get_name() on this
later on, we were working on a dangling pointer. It means that the fact
we didn't have crashes most of the time was the unexpected part, not the
crash itself!

Same for gimp_image_set_simulation_bpc() and "image-simulation-bpc"
parasite.

The fix is to swap the order of statements to first detach the parasite.
2025-10-28 12:18:55 -03:00
Jehan
34930eb7ab
app: indentation fix.
Was just itching when looking at it!
2025-10-28 12:18:50 -03:00
Jehan
a59a76d9e5
Issue #14014: do not allow NULL or empty parasite name.
This reverts commit 7b023177a8 and reimplement it as a CRITICAL because
if this happens, a bug has occured. If so, we don't want to hide the
bug, we want to be warned of it so that we can investigate further.

Clearly it should simply not be possible to create a parasite with a
NULL name. First if we look at xcf_load_parasite(), we were already
returning early when the name was NULL. Also even the constructor
gimp_parasite_new() has an early check and will return NULL on a NULL or
empty name.

So the question is: how come we had a parasite with NULL name (if that
is really the problem)? I don't have the answer to this and it's
possible that this bug had already been fixed somehow. But in any case,
if it happens again, we'll want this CRITICAL to run.
2025-10-28 12:18:46 -03:00
Gabriele Barbero
2ddb3ab7e5
core: check for NULL name in gimp_parasite_list_remove
Sometimes, probably due to a metadata corruption, a pasarite with a NULL
name can be present in the parasite list. This causes a crash when
trying to remove it, because `gimp_parasite_list_find` does not accept NULL
keys. This commit adds a check for NULL names in `gimp_parasite_list_remove`.

(cherry picked from commit 7b023177a8)
2025-10-28 07:33:33 -03:00
Jehan
8be38125bd
Issue #14799: sync source and filtered container freeze count at creation.
This one was happening very rarely, which made it hard to track, though
I think it would happen more frequently to people with a lot of fonts
(and therefore font loading would take a lot of time) since the
problematic situation occured when the thread callback
gimp_font_factory_load_async_callback() would run after the
corresponding tagged container was created in constructor
gimp_data_factory_view_constructor().

When this happened, the source and filtered containers were not
synchronized regarding their freeze count. And in particular, the
filtered container would have one less freeze and would try to thaw once
the thread callback ran and thaw the source container, which was
provoking the CRITICAL.

(cherry picked from commit 8f9b742b51)
2025-10-28 07:33:10 -03:00
Alx Sa
95ed1c030f
widgets: Turn off default search in ComponentEditor
Resolves #9324
In GTK3, a default "Search" is enabled by default in GtkTreeView.
While in most places we override this with our own search feature,
it was not explicitly set for the GtkTreeView in the GimpComponentEditor
in the Channel dockable. So, it defaulted to TRUE and created an
unnecessary pop-up whenever you typed after clicking a channel.

This patch calls gtk_tree_view_set_enable_search () and turns off
this default feature.

(cherry picked from commit cb552d3dc0)
2025-10-28 07:32:37 -03:00
Anders Jonsson
0a8becd612
po-python: fix segmentation fault in Dzongkha language
Fixes https://gitlab.gnome.org/Teams/Translation/dz/-/issues/3

The plural form for po-python/dz.po causes a segfault when trying
to run the Python console, so change it to the plural form used
in the other Dzongkha files in GIMP.

(cherry picked from commit 9bf1152dd8)
2025-10-28 07:31:57 -03:00
Jehan
02eba365d4
Issue #13787: ignore GimpControllerMouse when migrating controllerrc.
As said in previous commit, this controller was removed as commit
76ddf4421c. Unfortunately we can't easily remove the full
(GimpControllerInfo) record, unless we were to redo or enhance the
migration code, because current code works line by line.

Nevertheless this change is enough to render the GimpControllerInfo
object invalid in a way where we can detect and clean it out (cf.
previous commit).

(cherry picked from commit a9dce982a6)
2025-10-28 07:31:11 -03:00
Jehan
4734790eb0
app: clean the controller manager off invalid controllers after…
… controllerrc config file deserialization.

This is the first part to handle #13787 and not a bad idea by itself
per-se, since we remove one way to crash GIMP by creating an invalid
controllerrc file.

(cherry picked from commit 57f8e233f7)
2025-10-28 07:29:18 -03:00
Jehan
d151338aee
libgimpconfig: better error message when a GObject property tries to…
… deserialize with a wrong or unknown type.

The error message in issue #13787 was about trying to deserialize a
GimpControllerMouse object as GimpControllerInfo's controller. Yet
GimpControllerMouse was removed with commit 76ddf4421c so this was
failing.

With this change, such error would be more explicit, with an error
saying:

> Unknown object type: GimpControllerMouse

… instead of:

> unexpected character ')', expecting string constant

(which was very confusing to the actual issue)

(cherry picked from commit 5831b7ddcb)
2025-10-28 07:24:55 -03:00
Jehan
1e2fda6ca4
app: fixing more broken parasite name for custom config parasites.
(cherry picked from commit a67bd8b9e4)
2025-10-28 07:23:36 -03:00
Jehan
fc8ac03bca
app: fix action label casing.
(cherry picked from commit 5356e86a06)
2025-10-28 07:20:26 -03:00
Sabri Ünal
77ff09978b
appdata: Add release URLs
This URLs are useful when users want to see more information about
release notes. They are visible on software stores like GNOME Software
and software websites like Flathub.

(cherry picked from commit 0f07df00d9)
2025-10-25 09:35:56 -03:00
Kolbjørn Stuestøl
7f0119c53a Update Norwegian Nynorsk translation 2025-10-24 15:54:12 +00:00
Ekaterine Papava
5408173416 Update Georgian translation 2025-10-24 07:08:39 +00:00
Yuri Chornoivan
c778f51d18 Update Ukrainian translation 2025-10-23 14:26:49 +00:00
Sabri Ünal
4a73aef43c Update Turkish translation 2025-10-22 15:13:15 +00:00
Sabri Ünal
894f3f7b25 Update Turkish translation 2025-10-22 15:13:07 +00:00
Bruno Lopes
6cd0f3d378
build/linux: Update Graphviz module to 14.0.2
Synced from: d984ed8772

(cherry picked from commit 44d07a8b7f)
2025-10-21 09:30:02 -03:00
Alan Mortensen
f53684c0c7 Update Danish translation 2025-10-19 09:50:36 +00:00
Bruno Lopes
37dc690f91
build/windows: Make possible to build (babl only) with MSVC
(cherry picked from commit 8e6a99d0e0)
2025-10-18 22:37:23 -03:00
Bruno Lopes
3450f85d65
build/linux: Mention name: on preview and latest snap README
(cherry picked from commit 0895695d87)
2025-10-17 20:22:16 -03:00
Alx Sa
0492da6949
plug-ins: Fix crash when removing flares in Gradient Flare
Resolves #15113
There is code in the Gradient Flare plug-in to prevent deleting
gradients when there is only one left. However, the flare count
was not being properly updated. Due to a stray unbounded IF
statement, "if (tmp->next == NULL)", the num_gflares variable
was only decremented if you deleted from the bottom of the list.
As a result, you could delete all the flares and cause the plug-in
to crash when it tried to render a non-existent flare.

This patch removes the stray IF statement and adds additional checks
to make sure dlg->gflare exists before trying to get a pointer from it.

(cherry picked from commit 3cb0eb2df5)
2025-10-17 20:22:12 -03:00
Bruno Lopes
57d2fa8b51
build/linux: Bump openexr module to 3.4.2
Synced from 7f1b70cbab

(cherry picked from commit b3fe88323c)
2025-10-17 15:03:31 -03:00
Bruno Lopes
eb2f412b53
devel-docs: Fix Color Notebook image label
See: Infrastructure/gimp-web-devel#35
(cherry picked from commit 4d64bab97a)
2025-10-17 13:42:33 -03:00
Bruno Lopes
3753425df1
devel-docs: Finish devel-docs cleanup
See: Infrastructure/gimp-web-devel#9

gitlab-mr.md was removed without replacement since the
package generation info is now on the MR template for
everyone's benefit (6245e4ee) and the test of the
text was mainly personal annotations.

(cherry picked from commit f771437242)
2025-10-17 10:05:14 -03:00
Bruno Lopes
bfc72b9d18
devel-docs: Move GIMP 3 porting guide to gimp-web-devel
See: Infrastructure/gimp-web-devel#9

Except API-for-resources.md, which is ugly and
not linked in the README. And GIMP3-API-Changes,
which seems to be just a personal annotation.

(cherry picked from commit 13d3643ad7)
2025-10-17 09:25:30 -03:00
Alx Sa
f59768647d
plug-ins: Set background fill for multi-page PDF
Resolves #14752
Our previous logic only worked for single-page PDFs.
If a multi-page PDF was exported, only the first layer
would have the background color set - the rest would
always be transparent regardless of user choice.

This patch moves the "fill background" logic deeper into
the layer drawing code, so that it is considered for each
layer rather than once at the beginning. It is also adjusted
for different situations, such as when the user wants group
layers to be combined.

(cherry picked from commit 6910945bd4)
2025-10-17 09:25:27 -03:00
Bruno Lopes
ade7d43e8e
build/linux: Add instructions about gimp-plugins bump on preview Snap too
(cherry picked from commit 768ff5bc5d)
2025-10-17 09:25:23 -03:00
Bruno Lopes
e1201a674d
devel-docs: Move advanced concepts to gimp-web-devel
See: Infrastructure/gimp-web-devel#9

Also, drop interpreters.txt since we have an example file.

(cherry picked from commit 21044e61f2)
2025-10-17 09:25:20 -03:00
Bruno Lopes
31fd0089a7
devel-docs: Remove gimp-data-ish text
(cherry picked from commit d997fd39a6)
2025-10-17 09:25:17 -03:00
Bruno Lopes
e3cbf1b9fe
build/linux: Add GIMP major version on content: of gimp-plugins plug
Similarly to Flatpak's "add-extensions"."org.gimp.GIMP.Plugin"."version".
Otherwise, we would have broken Snap plugins on GIMP 4 which breaks API.

(cherry picked from commit ad2c3beded)
2025-10-16 12:52:10 -03:00
Bruno Lopes
25f8e295d0
.gitlab: Update link to Image formats list page
See: Infrastructure/gimp-web-devel@d7e6312b
(cherry picked from commit 446f21d527)
2025-10-16 12:52:07 -03:00
Bruno Lopes
d6523074ff
.gitlab: Mention Snap and MS Store packages on issue templates
(cherry picked from commit ae32786a55)
2025-10-16 10:49:53 -03:00
Jehan
d8ed135959
Issue #15099: --no-interface mode broken on macOS.
(cherry picked from commit f175004be3)
2025-10-15 21:00:14 -03:00
Jehan
b21f1e4e04
app: revert to previously selected drawables when getting out of quick mask.
(cherry picked from commit 11dc1c6b47)
2025-10-15 21:00:08 -03:00
James Addison
689676117c
app: allow gimp command-line to run in console mode
When non-interactive mode is requested (the -i command-line flag),
_and_ we've compiled the app with UI support enabled, allow `gimp`
to branch into the console-based version of the app -- equivalent to
running it using `gimp-console`.

This avoids GTK-related failures open a display when one is not
not available (for example, when running `gimp` within a container
or a VM without a graphical display).

(cherry picked from commit ea0574b86c)
2025-10-15 14:09:47 -03:00
Bruno Lopes
984105b486
build: Make CI_COMMIT_TAG check more robust
(cherry picked from commit 4d7135f6f2)
2025-10-15 12:51:59 -03:00
Bruno Lopes
65810ca844
gitlab-ci: Fix Store pipeline rules: after cbe56ff3
(cherry picked from commit 3490dcc042)
2025-10-15 12:06:59 -03:00
Dr. David Alan Gilbert
16af48d9d2
plugins: Remove unused struct 'camera_t' on sphere-designer
(cherry picked from commit 7d971a05c6)
2025-10-14 16:47:50 -03:00
Bruno Lopes
1496db7351
build/linux: Do not allow creating gimp snap with master gimp
Also, do some improvements on babl/gegl check.

(cherry picked from commit 67040c7f99)
2025-10-13 20:49:48 -03:00
Bruno Lopes
6ff3804a7f
build/linux: Do not allow creating gimp snap with master babl or gegl
(cherry picked from commit ccae1022ad)
2025-10-13 14:40:29 -03:00