... or copied RGB channel
In gimp_drawable_merge_filter(), make sure the drawable's source
node is constructed before applying the operation. The
construction of the source node connects the drawable's filter
stack to the udnerlying source node (usually, the buffer-source
node), which we rely on when calling
gimp_gegl_apply_cached_operation(), since we pass
connect_src_buffer == FALSE. Otherwise, the operation is applied
to an empty input, instead of the drawable content.
(cherry picked from commit 0e29fc1b21)
In gimp_histogram_view_update_bins(), don't update the view's
range if there's no histogram or the histogram is empty, to avoid
discarding the existing range. Additionally, improve the range
readjustment when the number of bins changes.
(cherry picked from commit 0c899394b4)
We are running gimp_image_set_imported_file() when saving, with NULL to
drop the tie with the imported file. Let's only change the default
resolutions when we actually set an imported file.
Also set the `resolution_set` flag even when it doesn't change the
current values (hence no undo or signals), for instance setting from 300
to 300 PPI. In such case, even though nothing changes, the resolution
has to still be considered as explicitly set.
In the reporter case, any one of these 2 fixes is enough.
See also commit fef9b1d2a3 (set to 72 PPI as default for imported files
only) and commit a8f552da2f (set imported file to NULL).
(cherry picked from commit 417bf199c8)
I made the various static arrays in headers declared as extern and
defined in a separate implementation file, with additional size constant
when necessary (since G_N_ELEMENTS() cannot be used on partially
defined arrays).
Note that this is better than the original implementation, yet I am not
saying this is ideal either. I am not fond of such code organization and
think a better one could be done. But it would require to dive deeper
into this plug-in and I don't want to right now, nor have the time.
At least now it stopped shouting all these warnings!
(cherry picked from commit 31cbc7e0e6)
This cleans just a third of the warnings in this metadata plug-in. It is
a very bad practice to define static const strings in a header file like
this, especially if this header is included in several files. Let's make
these macros.
Also why are these header tags sometimes used with the const name (now
macros), sometimes directly with the string literals? I fixed some of
these, but more string literals are lying around.
Remaining warnings are similar, about const string arrays. If really we
want this, we should declare these extern and define them in a separate
implementation file. This whole plug-in should be really reorganized and
cleaned in depth.
(cherry picked from commit 024a919c77)
In the Bucket Fill tool, when using line-art mode, use a
GimpImageProxy as input for the GimpLineArt object, instead of
using the image direclty, when the line-art source is "all visible
layers". Set the proxy's show-all mode according to the active
shell, so that the line-art uses the full image projection,
including out-of-canvas regions, when in show-all mode.
(cherry picked from commit 43a1c33ecf)
... which corresponds to the shell's show-all mode. We'll listen
to its "notify" signal in the bucket-fill tool.
(cherry picked from commit 02654b0ac0)
In GimpLineArt, add support for arbitrary input-buffer extents,
by shifting/unshifting the input/output buffers before/after
passing them to the main algorithm, so that the algorithm keeps
working with buffers whose top-left corner is at (0, 0).
(cherry picked from commit bce96eb690)
In GimpImageProxy, implement the GimpPickable interface, so that
the proxy can be used as both a viewable and a pickable for the
image projection, with direct control over the show-all mode. This
will allow us to use a GimpImageProxy as input for a GimpLineArt.
(cherry picked from commit 0e02795128)
We're going to have GimpImageProxy implement GimpPickable, so that
it can be used as either a viewable or a pickable proxy for an
image.
(cherry picked from commit 8d8cc12f40)
Add an internal gimp_image_get_preview_format(), which returns the
format to use for preview buffers, and use it in both
gimpimage-preview and GimpImageViewable, to reduce duplication.
(cherry picked from commit 74009c8b1e)
In gimp_config_deserialize_fundamental(), cast integer token values
to the target value type *before* negating them, to avoid
performing unsigned negation, which can result in a positive value
when cast to the target value type (in particular, when the target
value type is float/double).
(cherry picked from commit 38fff3b6b3)
In particular, if the shebang is `#!/usr/bin/env lang` and we have not
registered a specific interpreter for `lang`, the system should leave
the env tool search the right interpreter for us. We only bypass env
when we set our own explicit interpreter.
(cherry picked from commit 9e844ae1d7)
Slight modification from master commit: not applying to
palette-to-gradient.py plug-in.