And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.
The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.
GIMP was doing evil hacks lying to GEGL about it's pixels being in a linear
color space when they are not. This causes incorrect rendering, makes gaussian
blur misbehave etc.
The legacy projection modes should be implemented using the same 2.2 gamma
formats that are correct to specify for sRGB data. (for proper color
management in higher bitdepths; icc backend babl formats should be used.)
For the old image modes correct babl formats are:
R'G'B'A u8 - 8 bit RGB with 2.2 gamma (sRGB) with linear alpha component
R'G'B' u8 - 8 bit RGB with 2.2 gamma (sRGB)
Y'A u8 - 8 bit Grayscale with 2.2 gamma with linear alpha component
Y' u8 - 8 bit Grayscale with 2.2 gamma
Y u8 - 8 bit linear data, used for masks/channels
A u8 - 8 bit linear alpha
-----------------------------------------------
RGBA float - 32bit floating point linear light RGB
RaGaBaA float - 32bit floating point linear light RGB, premultiplied alpha
to be used for processing that needs to scale by the alpha,
(blurs, resampling etc)
R'G'B'A float - 32bit floating point sRGB with gamma, to be used where
the result depends on being closer to perceptual when
processing, can be used a cheaper alternative to CIE Lab
based modes.
-----------------------------------------------
The legacy layer modes should use the formats with gamma 2.2 only for loading
and rendering legacy XCF files correctly, in the brave new world compositing
should most likely be done in linear light with "RGBA float" and even better
"RaGaBaA float" like GEGL does for porter duff and other compositing modes.
The ability to chose the legacy layer modes should probably be hidden from the
user unless an old .xcf has been opened.
as long as it has the same number of bytes. Add
gimp_tile_manager_create_buffer_with_format() for that purpose,
register a format that contains's only a u8 alpha byte, and use that
to extract alpha from drawables.
by adding gegl_buffer_flush() and gegl_tile_source_reinit() in the
drawable's buffer and tiles API, and at some half-ported places that
mix legacy and gegl code.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
GimpOperationLayerMode instantiable and add a GimpLayerModeEffects
property to it that we check in ::process() to blend pixels
together.
* app/gegl/gimpoperationlayermode.[ch]: Do the change described
above. Currently only Normal and Addition are implemented. Normal
so that we don't need a special case for the gegl:normal op. Also,
the Dissolve layer mode is not a point op and needs to be
implemented elsewhere.
* app/gegl/gimpoperation*mode.c: Removed.
* app/gegl/gimp-gegl-utils.[ch]: Removed
gimp_layer_mode_to_gegl_operation().
* app/core/gimplayer.c
* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c: Adapt.
svn path=/trunk/; revision=27400
2008-10-13 Michael Natterer <mitch@gimp.org>
* app/gegl/gimp-gegl-utils.[ch]: remove function
gimp_bpp_to_babl_format_linear() and add "gboolean linear"
parameter to gimp_bpp_to_babl_format().
* app/gegl/gimpoperationtilesink.c (process)
* app/gegl/gimpoperationtilesource.c (prepare): simply pass
self->linear to above changed function instead of selecting
between the two old functions.
svn path=/trunk/; revision=27275
2008-10-09 Michael Natterer <mitch@gimp.org>
Address Bug 554983 – Layers Projection using GEGL
* app/gegl/gimp-gegl-utils.[ch]: add (imcomplete) function
gimp_layer_mode_to_gegl_operation() from bug #554983.
* app/core/gimpdrawable.[ch]: add gimp_drawable_get_source_node()
which returns a GimpOperationTileSource for the drawable's
tiles.
(gimp_drawable_real_set_tiles)
(gimp_drawable_configure): set the node's "tiles" property.
* app/core/gimplayer.[ch]: add gimp_layer_get_node() which returns
a GeglNode with proxy "input" and "output" pads to be plugged
into the projection graph. The node has children for opacity,
mask, layer mode and layer offset.
(gimp_layer_translate)
(gimp_layer_add_mask)
(gimp_layer_apply_mask)
(gimp_layer_set_opacity)
(gimp_layer_set_mode): reconfigure the respective nodes.
* app/core/gimpimage.[ch]: keep a "graph" node around and destroy
it in finalize(). Not even a stub, just a silly GEGL dependency.
svn path=/trunk/; revision=27204
2007-12-30 Sven Neumann <sven@gimp.org>
* app/gegl/gimp-gegl-utils.[ch]: added new function
gimp_bpp_to_babl_format_linear().
* app/gegl/gimpoperationtilesink.[ch]
* app/gegl/gimpoperationtilesource.[ch]: added boolean property
to
toggle between linear and gamma-corrected data.
* app/core/gimpdrawable-invert.c: assume linear data to be
closer
to the original definition of the invert operation in GIMP.
Enable the GEGL code path per default.
svn path=/trunk/; revision=24491