Commit Graph

81 Commits

Author SHA1 Message Date
6938d11716 Issue #1997 - Colors not properly converted to image's color space
Add a Babl space parameter to gimp_gegl_color_new() and all utility
functions using it. Pass NULL if the GimpRGB actually is sRGB, pass
the image's layer space if the color was already converted using
gimp_pickable_srgb_to_image_color() or similar.
2018-08-09 20:04:44 +02:00
5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell
66bb469a78 Bug 786992 - removing alpha produces a black image (sometimes), with OpenCL
When creating a flatten node, which is used when removing alpha
channels and when flattening an image, use a gimp:normal node to
combine the layer with the background color, instead of a gegl:over
node.  gegl:over can apparently result in completely black output
with OpenCL enabled, under certain (not fully pinned-down)
conditions.

As long as the OpenCL version of gegl:over is borked, there is not
much reason to use it over gimp:normal, which is more consistent
(in intension, if not in extension) with the rest of the
compositing pipeline.
2017-10-21 11:44:27 -04:00
Ell
0c305bdb0f app: use the layer's composite space when flattening it
Add a composite_space parameter to gimp_gegl_create_flatten_node()
and gimp_gegl_apply_flatten(), which controld the color space --
linear or perceptual RGB -- used for the operation (instead of
hardcoding it to linear).

When removing a layer's alpha channel, use the layer's composite
space for the flattening.  When flattening an image, use the bottom
layer's composite space.  Keep using linear space when creating a
channel or a mask from a drawable with alpha.
2017-10-21 11:44:27 -04:00
Ell
7402127505 app: remove GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA and friends
Instead, add a gimp_layer_mode_get_format() function, which takes
the layer mode, composite space, and blend space, and returns the
I/O format.

Currently, we always use the composite space format as the I/O
format.  This simplifies gimp_composite_blend(), and gives us
composite-space support for the "special" layer mode ops for free.
2017-02-17 18:19:32 -05:00
8634b5cbc3 app: make layer blend color space and compositing color space configurable
...they say it's going to get worse before it gets better...
2017-02-12 23:49:26 +01:00
2950fecf07 app: move layer mode enums and gimp-layer-modes.[ch] to operations/
and to operations/layer-modes/, respectively.

Add gimp_layer_modes_init() which asserts on the correct order of the
GimpLayerModeInfo array, and switch to accessing the array directly in
gimp_layer_mode_info().
2017-02-05 15:59:29 +01:00
2a96d598c3 app: add internal and PDB API and UI to control a layer's composite mode
Largely based on a patch by Ell, with the enum type renamed and
various small changes. Adds another axis of configurability to the
existing layer mode madness, and is WIP too.
2017-02-02 00:38:25 +01:00
2dbf1b46b2 app: rename gimp_layer_mode_is_linear() to gimp_layer_mode_wants_linear_data() 2017-01-31 01:43:48 +01:00
d3b8a0d007 app: s/trc/space/ in the property names too 2017-01-22 17:14:44 +01:00
b10fc58802 app: add a "layer-mode" property to GimpOperationLayerMode 2017-01-22 14:41:21 +01:00
894d4c0c01 app: finish GimpLayerColorSpace rename 2017-01-19 19:33:17 +00:00
1262370544 app: remove "gboolean linear" parameters
from gimp_applicator_new() and gimp_gegl_mode_node_set_mode().
Compositing doesn't depend on the layer format any longer, only on the
layer mode. Painting with "use applicator" unchecked is still broken
in some cases and needs more fixing.
2017-01-18 00:15:55 +01:00
6e72d3eddf app: add blend-trc and composite-mode properties to GimpOperationPointLayerMode
and set them to unused default values.
2017-01-17 15:09:17 +01:00
a24e232522 app: move functions on enum GimpLayerMode to new files gimp-layer-modes.[ch] 2017-01-15 15:25:03 +01:00
50669fe6d4 app, libgimp: rename BEHIND enum values to be consistent with others
Also update gimplayermodefunctions.c which I forgot before.
2017-01-15 00:01:09 +01:00
6bf9e47ba8 app, libgimp: add linear variants of most layer modes
and reorder gimp_gegl_mode_node_set_mode() and friends.
2017-01-14 22:56:54 +01:00
bd66794e2c app: avoid the second gegl_node_set() in gimp_gegl_mode_node_set_mode() 2017-01-14 18:35:56 +01:00
4df1af2534 app: add linear variant of behind mode 2017-01-12 14:27:15 +01:00
377f4687b1 app: add gimp_gegl_mode_is_linear 2017-01-11 22:13:14 +01:00
5271027510 app: explictly code linear vs gamma for hardlight and softlight 2017-01-11 19:39:46 +01:00
f9aeff5670 app: fix a lingering old gimp:softlight-mode 2017-01-11 15:17:30 +01:00
8b5553cef6 app: move the remaining 3 layer modes to layer-modes/
Not exactly sure if all are correct, but the file moving is almost
done now.
2017-01-11 12:55:13 +01:00
7ed2857695 app: fix type s/legacyy/legacy/ 2017-01-11 05:34:55 +01:00
ec1f7a94e3 app: split legacy out of grain extract and merge 2017-01-11 04:40:26 +01:00
8f3842434c app: split legacy out of soft and hard light 2017-01-11 04:10:06 +01:00
784a8ee224 app: split legacy out of burn and divide 2017-01-11 03:17:53 +01:00
0891028232 app: forgot to s/gimp:normal-mode/gimp:normal/g 2017-01-11 00:28:57 +01:00
9142bb1805 app: move erase and anti-erase to layer-modes/ 2017-01-11 00:23:31 +01:00
0fcc2cd772 app: also fix multiply enum/name mapping 2017-01-11 00:12:45 +01:00
2ce25045fe app: fix fix 2017-01-11 00:10:09 +01:00
33f6398e00 app: fix enum to name mapping for hsv legacy modes 2017-01-10 23:46:01 +01:00
71030f49e9 app: duplicate hsv layer modes, and fix alpha handling 2017-01-10 21:48:03 +01:00
c3e5e30450 app: split legacy lighten only and darken only ops 2017-01-10 11:18:52 +01:00
99189d7a28 app: move dissolve to layer-modes/ 2017-01-10 09:06:16 +01:00
5a7fd54d34 app: split addition and subract in legacy and new 2017-01-10 01:40:14 +01:00
60e1d8e35f app: move the LCH layer modes to layer-modes/ 2017-01-10 01:04:49 +01:00
b001626b31 app: move overlay to operations/layer-modes/ and call it GimpOperationOverlay 2017-01-09 23:54:51 +01:00
b6be1b768e app: duplicate difference mode, new and legacy 2017-01-09 23:49:08 +01:00
3a50cdcd4f app: split screen op in legacy and new 2017-01-09 23:19:29 +01:00
076621dd75 app: split dodge op in legacy and new 2017-01-09 20:10:17 +01:00
c2583faa5a app: add new multiply op 2017-01-09 20:10:04 +01:00
735887286a app: do not let pixel encoding determine layer modes
See bug #757485 - woth noting that this also enables linear and thus correct
compositing when using 8bpc perceptual gamma as the layer storage format.
2017-01-09 20:09:50 +01:00
152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +01:00
66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
a7b84ded8e Bug 325564 - Use CIE LCH instead of HSL for layer mode Color
Add Hue, Chroma, Color and Lightness layer modes in LCH color space.
2015-06-02 01:37:26 +02:00
bc4cf9918f Bug 673501 - Issue with Overlay
GIMP's OVERLAY mode was identical to SOFTLIGHT. This commit fixes the
issue and introduces a NEW_OVERLAY mode and enum value.

- change gimp:overlay-mode to be a real (svg-ish) overlay mode
- when compositing, map OVERLAY to gimp:softlight-mode
- when compisiting, map NEW_OVERLAY to gimp:overlay-mode
- bump the XCF version when NEW_OVERLAY is used
- map OVERLAY to SOFTLIGHT when loading and saving XCF
- map OVERLAY to softlight in all PDB setters
- map OVERLAY to softlight when deserializing a GimpContext
- change all paint mode menus to show an entry for NEW_OVERLAY
  instead of OVERLAY
- change PSP, PSD and OpenRaster to use NEW_OVERLAY

These changes should (redundantly) make sure that no OVERLAY enum
value is used in the core any longer because it gets mapped to
SOFTLIGHT at all entry points, with the downside of introducing a
setter/getter asymmetry when OVERLAY was set in a PDB api.
2015-04-29 13:32:58 -04:00
41c92af49b app: add gimp_gegl_node_set_color() and use it in GimpChannel 2013-10-19 17:31:56 +02:00
f70e4cdba9 app: don't reset the mode node's opacity when changing the layer mode
gimp_gegl_mode_node_set_mode(): re-set the previously set opacity.
2013-06-12 22:13:01 +02:00
eafcc4801c app: accidentially removed a function's return type 2013-04-27 08:23:58 +02:00