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.
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.
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.
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.
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]
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.
… 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.
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.
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).
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.
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.
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.
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.
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.
...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.
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.
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.
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.
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.