Commit graph

54878 commits

Author SHA1 Message Date
Bruno Lopes
d56676a2fa
meson, desktop, plug-ins: Generate MIMEtypes var dynamically
This way, we avoid divergence with MIMEs declared on the
plug-ins .c and .py files and we eliminate duplicate work.

See also: 2ce3c604
2025-06-13 13:47:19 -03:00
Jacob Boerema
a2bd03a471 app: use GIMP_BRUSH_MAX_SIZE instead of a fixed number...
to check for the maximum allowed size of a Photoshop brush.
2025-06-13 12:15:06 -04:00
Jacob Boerema
67f505009a app: add support for loading Photoshop patterns
For now only RGB and grayscale are supported.
2025-06-13 11:44:32 -04:00
Jacob Boerema
934c4a90cd app: refactor Photoshop stream loading functions
Since these functions used in gimpbrush-load will also be used in
Photoshop pattern loading, move them to gimp-utils.

At the same time, change the signature to return a boolean which
indicates TRUE on success and make the returned value a parameter.
This makes it easier to check multiple read calls for success.
2025-06-13 11:19:35 -04:00
Bruno Lopes
35fbb10d43
desktop: Use GIMP_DESKTOP_NAME on appdata too 2025-06-13 10:17:09 -03:00
Bruno Lopes
b57744ceba
build/linux: Fix AppImage StartupWMClass
This completes aede2709b0
2025-06-13 10:09:22 -03:00
Martin
745bf31cd7 Update Slovenian translation 2025-06-13 05:42:12 +00:00
Martin
fa8a12a29e Update Slovenian translation 2025-06-13 05:39:30 +00:00
Bruno Lopes
472123181d
build/windows: Do not bundle unneeded share/metainfo on Windows
Seems it was used at runtime in the past but that is
not the case anymore. Indeed, it started to be bundled in
af79bbe028 due to an
error: before the Windows bundling unification the
crossbuilds "script" on .yml bundled all the 'share' dir.
2025-06-12 18:59:48 -03:00
Alx Sa
c2b9c21b5b core: Add alpha on merge if filter requires it
Some filters such as Color to Alpha require
an alpha channel. Now that we have NDE,
filters can exist separately from layers
until they're merged down. This means
the layer itself may not have an alpha
channel, causing distortions on merge.
This patch adds a method to check if
the filter requires an alpha channel, and
adds it to the layer on merge or export if
it has such a filter.
2025-06-12 18:04:09 +00:00
Yuri Chornoivan
50df422969 Update Ukrainian translation 2025-06-12 15:24:25 +00:00
Alx Sa
9a349e812b app/tools: Use NDE filter's drawable for on-canvas widgets
Resolves #14240
This patch extends a9056419 to use the existing filter's
drawable (if it exists) on all other on-canvas widgets instead
of always using the selected layer.
2025-06-12 15:11:31 +00:00
Alx Sa
03bf117110 plug-ins: Remove unnecessary file size check...
...for file-tim-load, as we use other methods to check
if the data we load exceeds the size of the file.
2025-06-12 11:53:06 +00:00
Jehan
e98fc3dbf6 plug-ins: closing a NULL File.
This is a code path where we already verified that the returned FILE was
NULL. The compiler complained too:

> plug-ins/common/file-tim.c:280:7: warning: argument 1 null where non-null expected [-Wnonnull]
2025-06-12 13:31:27 +02:00
Jehan
80fe32dfc6 pdb: also allow none_ok on PDB type 'guide'.
This would be theoretically useful for gimp-image-find-next-guide except
that this function was already using the int type, and allowing 0. I'm
not changing to 'guide' type with none_ok because it would break the
libgimp API (the signature would change, with the type changing from
gint to guint).

Since it already works like this, I just leave a TODO for further
update.

With this and previous commit, we now fully replaced commit 69894d8bbf
attempts for allowing 0 to some types. There was in fact also some
change on 'tattoo' type, but I went through all the PDB functions we
had, one by one, and I don't think we currently have a single case where
we need to allow 0 as a tattoo value. If this need ever arises then we
can always add none_ok support easily in the future.
2025-06-12 13:21:52 +02:00
Jehan
bf14d3db20 Issue #14205: gimp-image-find-next-sample-point returns error when…
… passed "0" as argument.

Adding support of none_ok for arguments of type sample_point, allowing
to pass 0 as a special value and use it on this function.
2025-06-12 12:59:10 +02:00
Jehan
2d2f1d048d Revert "PDB: fix #14205 image-find-next-sample-point error"
This reverts commit 69894d8bbf.

Let's not randomly make our API less strict on types as a workaround for
a bug. If there are specific cases where it's needed to accept 0, then
these are the cases we have to handle.

Also unlike what the commit message was saying, it's not true that this
was only affecting Script-Fu. Any change to the PDB affects by
definition the whole PDB, as well as libgimp and all bindings (over PDB
or libgimp alike). And yes, this change **was** of "real consequence".

I'll do further commits for the proper fixes to #14205.
2025-06-12 12:59:10 +02:00
Luming Zh
d86b26dc4b Update Chinese (China) translation 2025-06-12 00:53:23 +00:00
Jehan
2244d70a94 Issue #13183: use the renamed desktop filename in Flatpak.
Since MR !2158, we set the desktop name as prgname, because that's what
is expected for Wayland. But this doesn't work on Flatpak where the
desktop file is renamed (and even to different names for the stable/beta
vs. nightly flatpaks). This commit adds some special-casing when we
detect we are inside a flatpak environment.

Note that on X11 (whether or not we are in flatpak), we just always use
the original desktop name, because then it will be set as windows'
WM_CLASS which will also match the StartupWMClass key we set in the
desktop file (cf. previous commit).
2025-06-12 02:31:36 +02:00
Jehan
aede2709b0 Issue #14233: incorrect StartupWMClass in gimp.desktop.
The WM_CLASS X property is apparently set to windows throughout the
program by the g_set_prgname() call which we changed in commit
95e32ebb34 from being the executable name (being the fully qualified
program name with the version) to the desktop name.
2025-06-12 02:31:36 +02:00
Alx Sa
0370aed02d tools: Don't run Foreground Selection without strokes
The Foreground Selection algorithm was being run when
users switched to a different tool, even if no strokes had been
painted. This caused an unnecessary delay, since no selection
will be generated.
This patch adds a check to verify we have at least one foreground
stroke made by the user before trying to create the selection.
2025-06-11 19:49:52 +00:00
Bruno Lopes
1f8f17cd9a
gimp-data: Bump to fix #14236 2025-06-11 16:00:00 -03:00
Alx Sa
54c95577df widgets, tools: Allow NDE filters on channels
This patch removes restrictions on applying
NDE filters to channels in the GUI. Note
that layer masks are still restricted, not for
technical reasons but because UX/UI needs
to be considered further.
2025-06-11 16:49:12 +00:00
Ekaterine Papava
7ba36e83a3 Update Georgian translation 2025-06-11 06:25:18 +00:00
Anders Jonsson
82c9a80de3 plug-ins: remove unmatched parenthesis 2025-06-11 06:50:19 +02:00
Jehan
427cc49074 desktop: new release tag for upcoming GIMP 3.1.2. 2025-06-11 03:04:45 +02:00
Jehan
a349db4c72 NEWS: update. 2025-06-11 03:04:45 +02:00
Luming Zh
679d9a8952 Update Chinese (China) translation 2025-06-11 00:55:35 +00:00
Luming Zh
78915f28f0 Update Chinese (China) translation 2025-06-11 00:53:43 +00:00
Jehan
fca4fd1bcc Revert "ScriptFu: scripts: remove obsolete script unsharp-mask"
This reverts commit fbee943213.

We must not remove any PDB function because we promise API stability
(not only in libgimp, but also in the PDB). Even if this was not used
anywhere in our own scripts/plug-ins, it may be used by third-party
scripts. At best, we can deprecate them so that people are properly warn
that we plan on removing a function. Then we'll remove it for GIMP 4.

Also I believe that various people were not perfectly happy with GEGL's
unsharp-mask operation, compared to the old one. And that was a reason
for keeping the legacy Script-fu version around. See gegl#122 or other
reports which mention such concerns.
At the very least, this should be discussed first with more specialized
developers to determine whether we consider GEGL's replacement operation
to be adequately replacing the historical script by now, so that we can
plan the removal for GIMP 4.
2025-06-11 02:26:16 +02:00
Daniel Novomeský
933a12335c plug-ins: AVCI import, HEJ2 export
AVCI images can be opened now, saving is not available in libheif yet.
Opening AVCI needs libheif 1.19.6 with OpenH264 decoder enabled.

HEJ2 images can be saved, when at least
libheif 1.19.8 with enabled support for OpenJPEG is detected.
2025-06-10 23:27:59 +02:00
Danial Behzadi
82eb34503f Update Persian translation 2025-06-10 21:26:17 +00:00
Alx Sa
963830fd91 libgimp, libgimpwidgets: Add GimpCoordinates widget...
...to GimpProcedureDialog.
This patch allows plugin developers to create a
GimpCoordinates widget (two GimpSizeEntries linked
together with a chain and with a units combo) in the
GimpProcedureDialog.

It is largely a wrapper for gimp_prop_coordinates_new ().
This patch also makes that function more responsive
to the unit property, now that GimpUnit has a proper
GParamSpec implementation. The default unit and
whether we show pixels, percents, or the resolution
spinners can now be determined via the unit
parameter (if set) rather than relying on
hardcoded values.

As a demonstration, the Tile plug-in's width/height
entries were restored to what they were before the
GimpProcedureDialog port, with units and a chain
link between values.
2025-06-10 19:37:35 +00:00
Ekaterine Papava
c1a56ff0b3 Update Georgian translation 2025-06-10 04:13:26 +00:00
Ekaterine Papava
dd5379662b Update Georgian translation 2025-06-10 04:10:51 +00:00
Anders Jonsson
51a64babca po, po-plug-ins: update POTFILES.in 2025-06-09 22:59:02 +02:00
lloyd konneker
fbee943213 ScriptFu: scripts: remove obsolete script unsharp-mask
Was replaced by a GEGL filter, long ago.

See 18 year old commit 31282ecc by Sven that says this exists for backward compatibility.
Which means we should have removed it befoe GIMP 3.0 major release.

Provides nothing more than the GEGL filter, so just delete it,
and NOT move to gimp-data-extras repo.

Fix #13824 (or at least makes it moot.)

The obsolete script was not used by any code in the repo,
except for test scripts, which were changed to not use it.
2025-06-09 14:27:54 -04:00
lloyd konneker
ea238e4e5a ScriptFu: fix #12837 i18n for independent scripts
See /scripts/test/test-i18n.scm,
which has tests and documents use cases.

Some incidental refactoring and editing of comments.
2025-06-09 13:50:12 +00:00
Bruno Lopes
6dfd27b271
gimp-data: Bump commit 2025-06-09 10:18:04 -03:00
Alexander Shopov
2d1ab85214 Update Bulgarian translation 2025-06-08 19:44:49 +00:00
Alexander Shopov
529914250e Update Bulgarian translation 2025-06-08 19:42:34 +00:00
Alexander Shopov
6386cfe561 Update Bulgarian translation 2025-06-08 19:37:18 +00:00
Alexander Shopov
ffc5836e48 Update Bulgarian translation 2025-06-08 19:32:48 +00:00
Martin
32404df8f6 Update Slovenian translation 2025-06-08 07:05:55 +00:00
Alx Sa
6e58d05a56 widgets: Prevent filter container duplication
Resolves #14206
If the user clicks the Fx icon in the DrawableTreeView
repeatedly (and quickly enough), the "closed" signal
function that cleans up the Filter popover does not
run before the next creation code is started. This can
results in the previous view being left in editor->vbox,
leading to duplication.
This patch checks if the editor and view already exist when
the popover opens, and if so, it runs the clean-up code first.
2025-06-08 01:42:24 +00:00
Martin
9464e571ed Update Slovenian translation 2025-06-07 22:58:20 +00:00
Martin
050a2094bc Update Slovenian translation 2025-06-07 22:55:48 +00:00
lloyd konneker
69894d8bbf PDB: fix #14205 image-find-next-sample-point error
Three types declared in pdbgen perl code,
for sample-point, guides, and tatto objects,
declare too restrictive a range of permissible values.
They should allow the value 0, which the API uses as a sentinel value,
to represent "invalid object ID".
The types are for object ID's, which are unsigned.

GObject checks the declared range when you chunk into a GValueArray,
to call the PDB.

Declaring the attribute in the perl .pdb "no-validate"
is not sufficient since GObject doesn't understand
GIMP_PARAM_NO_VALIDATE, that flag is distinct from G_PARAM_NO_VALIDATE.

Only affects the ScriptFu binding to PDB.
The GI binding to libgimp is not affected.

The declared range is no more restrictive than the underlying type
"unsigned int 32."
So of no real consequence.

The API could be changed to return a list which the caller
would iterate on.
2025-06-07 19:58:24 +00:00
Bruno Lopes
7fd2489985
build/linux: Run gimp process without LD interpreter on AppImage
Closes: #12929

This normalizes argv0, making the AppImage debuggable by gdb etc.

From now, the AppImage can't be run in pre-Bookworm (glibc < 2.36)
distros, but that use case was never officialy supported anyway.
2025-06-07 16:47:30 -03:00
Bruno Lopes
f2bd9fcd7f
build/linux: Do not bundle daemons on AppImage
We weren't launching then (and not sure if
we should at all). Also, the proper fix to
some errors encountered is 330ebe90.
2025-06-07 13:44:40 -03:00