When converting an image TRC (or a precision+TRC change), we used to
convert the profile to a linear (resp. sRGB TRC) variant or use the
builtin profile, which we'd set on the image.
Pippin is telling me that "it used to be that linear and non-linear
precision gave different results, rather than only about how things were
stored". Yet this is not needed anymore. Nowadays "RGBA foo" + any
profile is linear anyway, disregarding the profile's TRC.
Furthermore, this way, we don't lose the original TRC in a non-linear ->
linear -> non-linear roundtrip and we simplify the code, which fixes
such problems as shown in #3495 as a side effect.
The code was perfectly working already, yet we were blocking the
non-interactive case only to stop automatic runs, such as generating
thumbnails. The chosen solution is not perfect either as it would break
on the odd case where a given raw data file's expected dimensions were
the default. Yet it's a start.
Fortunately I caught this one, because the string values of the
GimpChoice argument would have been part of the API and confusing bits
per pixel and per channel is not so good for a graphic program! 😅
Only places this was alright were the grayscale ones, with no alpha
(where there is only one channel, so bpc and bpp are the same). I
hesitated a lot of I should write BPC to be consistent with other args
or not. In the end, I stick to BPP there, since I find it somehow
clearer this way.
Luckily this doesn't break string freeze because there was no mention of
what the bit-sizes represent in the arg labels.
We check the width of the zoom label (if it exists) and use it to size the
combobox's entry field. Otherwise, we default to the existing formula.
Also removes Windows special-casing for PERCENT_SPACING constant,
as Pango now uses harfbuzz on Windows as well.
This patch temporarily reverts 02546da7,
due to performance issues with our use
of Babl. After 3.0, we'll try to improve
these operations so they can be more
color correct.
However, GimpRGB, GimpHSV, and GimpHSL are
replaced with double arrays.
There are certain operations where we're
not yet getting sufficient performance with
Babl. For these legacy operations, we'll
use the original GimpHSV/HSL conversions
internally. This will allow us to replace
them in the future without plug-in
developers relying on them.
The name for internal data may be localized. This is the case at least
for some dynamic gradients (Foreground to Background and others).
Nevertheless they have unique collection name. So let's simply rely on
this for internal data.
See point 2 in: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1830#note_2218014
I also change the standard alias fonts to also have unique collection
names. These seem to be the only other internal data which had no unique
collection until now, which is now fixed.
This ensures that the devs who follows Debian instructions at gimp-web-devel
can build a full-featured GIMP and maybe we have a full-featured AppImage.
- Simplify three functions into 'bund_usr' (similar to 'bundle' in Win script)
- Add 'wipe_usr' function (similar to 'clean' in Win script)
- Verbose the steps of AppImage making
- Log (go)appimagetool bundling of deps (not only the the .appimage making)
- Change AppRun to be more clear about our .appimage compatibility
This refactoring is not perfect but is good enough to anyone understand
how our AppImage is made just reading the script.
Resolves#12018
During the port to GimpProcedureDialog, we accidentally
inverted the set_sensitive () logic for using RLE and the
RGB format. RLE was being locked for indexed images while
the RGB format was being locked for RGB images.
This patch inverts the two conditions to fix the issue.
..with gimp_bilinear_rgb ().
This function takes in a double array of raw pixels,
a boolean to determine if the pixels have an alpha channel,
and a reference to return the final pixel to.
Resolves#10822
After improvements by Lloyd Konneker and Jehan,
Script-fu's implementation of GimpProcedureDialog retains
defaults for GimpResources.
This patch ports lava.scm to use the new API, and also switches
the default gradient to Incandescent.
gimp_brushes_popup() was triggering a popup allowing to change not only
the brush, but also the "paint mode", the opacity and the spacing. As
far as I could see, this was used nowhere for the paint mode and
opacity.
As for the spacing, it looks like gfig was indeed getting this data,
except that the GimpBrushSelect was disabling the effect on this scale
by setting change_brush_spacing to FALSE when calling
gimp_brush_factory_view_new(), and even setting this to TRUE, it was not
working fine anyway. Rather than debugging this, let's simplify the API.
Such settings seems like additional paint settings which don't have to
be in the brush selection. If someone wants people to also select an
opacity, spacing or paint mode, it would be much more efficient to add
separate plug-in arguments for these.
Additionally, I fix GimpBrushFactoryView not to show the spacing scale
when change_brush_spacing was set to FALSE anyway. This is just a bogus
widget then, which can only confuse people.
Also fixes the passing of the resource param definitions through PDB.
There was some weird assumption, with a comment, in commit 73733335c8
that this was unneeded, which meant that we were not able to properly
recreate the right param spec over the wire.
After commit #a7bc5f07, these plug-ins assert in local_grad_data_refresh().
A comment is clearly stating that the widget must be allocated, so make
sure that the callback is only connected at allocation.
GimpOperationHueSaturation did not do
conversions since the source was already
HSL, so its GimpHSL object was replaced
with a float array.
Van-Gogh plug-in's RGB -> HSL
conversion was replaced with an
HSL float Babl format with gegl_buffer_sample ().
Since no conversion operations are performed, just getting the
RGBA values from the gradient and then using them, this replaces
GimpRGB and GimpRGB * with gdouble * equivalents.
Per Anders Jonsson, removing this fixes
the issue with the grid colors on System
themes. As it does not work anyway
(the grid would be red if it did) and the
theme code is much better than it was
six years ago, lets remove it.
This abstract spec type is basically a GParamSpecObject with a default
value. It will be used by various object spec with default values, such
as GimpParamSpecColor, GimpParamSpecUnit and all GimpParamSpecResource
subtypes. Also it has a duplicate() class method so that every spec type
can implement the proper way to duplicate itself.
This fixes the fact that in gimp_config_param_spec_duplicate(), all
unknown object spec types (because they are implemented in libgimp,
which is invisible to libgimpconfig) are just copied as
GParamSpecObject, hence losing default values and other parameters.
As a second enhancement, it also makes it easier to detect the object
spec types for which we have default value support in
gimp_config_reset_properties().
As a side fix, gimp_param_spec_color() now just always duplicates the
passed default color, making it hence much easier to avoid bugs when
reusing a GeglColor.
- There is no reason whatsoever to make gimp_param_resource_value_set_default()
a no-op on core side. Also remove the whole commenting on this basic
function, especially as it's mostly wrong (why would core not use
default values? Why would we not transfer ownership? That's the whole
point of g_value_set_object() which increases the reference, hence
transfer ownership to the new reference…)
- Also removes the comment on GimpParamResource which is just explaining
basic GObject stuff and would only confuse contributors.
- Small indentation or coding-style fixes.
Now you can declare a default value when declaring resource arguments to
a PDB procedure.
Add default behavior to GimpParamSpecResource.
Add field and override g_param_spec_value_set_default.
Fix the plugins that have resource arguments.
Some plugins temporarily use a hardcoded default instead of declared default.
ScriptFu plugins, TODO.
Misc fix to the test plugin for this case: test-dialog.py.
Dev>Demo>Test dialog...
TODO 10822 Lava plugin issue depends on this.
Note film.c fixed but still doesn't work.
As discussed in !1725, there is an init order issue, which is that you
cannot obtain any of these ID objects as long as the GimpProcedure is
not created. In particular, now that GimpResource arguments can have
defaults, we will want to query such resource in the create_procedure()
implementation of a plug-in (where the GimpProcedure is not running yet,
as we are defining it!).
Anyway I don't really see the point of these multiple-level hash tables
all storing a reference to the same object. Let's just store in the
GimpPlugIn's hash tables once and give the same reference to any
procedure (anyway we make it clear that these objects belong to libgimp
and must not be freed, so it's a bug all the same if someone frees
them). Then it also fixes the init order issue.
As far as I understand, the created types are never "unregistered" and
will live in the process until it ends. It cannot even have a custom
class_finalize() (looking at g_type_register_static()'s code, a CRITICAL
is emitted if you try to provide a class_finalize() implementation).
So let's just free the allocated pspecs at the end of class_init()
instead.
This is a regression brought with commits 9b5463b5c5 and f7aaba9fc9.
Technically the bug already existed, but it was brought to light after
the reordering of our param bit flags, because GEGL_PARAM_PAD_INPUT
(which is set on all op properties) and GIMP_PARAM_DONT_SERIALIZE are
now the same value. It used to be same as GIMP_CONFIG_PARAM_AGGREGATE,
which, by chance only, didn't have unfortunate consequence on
serialization, yet that was also a bug. The real fix is that we should
not propagate GEGL bit flags in our operation config types.
Resolves#11993
In !1319, we added the ability to merge down filters destructively
in the Filter Tool GUI. This accidentally allowed you to merge down
a filter on a layer group. This patch adds checks to prevent this
option from being used, in the same way we hide the option when
editing an existing layer effect.
We didn't have a "destructive-action" class anymore and the
"suggested-action" was hidden by further CSS rule, so it needed to be
moved down so that it gets precedence.
We used to have these as red and green buttons originally (e.g. pasting
as floating selection, the "New Layer" and "Anchor" were the suggested
actions, i.e. green, whereas "Delete Layer" was destructive, red). For
GIMP 3.0, we keep grayscale design. We'll see if this will change later,
but at least, now we have something again.
The colors are assumed to be sRGB since they come from a
pre-defined array and are used for the item color tags in the
GUI. This replaces the call to gimp_rgb_composite () with the
direct implementation of the GIMP_RGB_COMPOSITE_NORMAL
code.
It also ensures that only one call is made to gegl_color_set_rgba (),
rather than two if the color is inherited.