Commit Graph

70 Commits

Author SHA1 Message Date
Michael Natterer 23c3cf7249 app: add gimp_gegl_node_get_format()
which is a wrapper around gegl_operation_get_format().
2016-06-08 00:04:50 +02:00
Michael Natterer cea4ea6cff app: require a text in gimp_gegl_progress_connect()
and simplify and fix the progress callback.
2016-05-11 22:50:33 +02:00
Massimo Valentini 85cb525c7e Bug 766128: Use gegl_operation_progress
instead of reimplementing it in two operations
2016-05-11 19:09:56 +02:00
Michael Natterer 1b71731cb8 app: clean up the GEGL progress code a bit
Includes code from Massimo from bug #763135.
2016-03-23 22:53:09 +01:00
Massimo Valentini b9ba90589a Bug 678085 - Cage tool freezes GIMP
Use a proper "progress" signal instead of a property "notify" one
to update the on-canvas progress widget.

This way the graph is not invalidated while processing it
2016-02-02 12:21:15 +01:00
Michael Natterer a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
Michael Natterer 8aa0019c2e app: clean up inclusion of gegl-plugin.h, mostly removals 2014-06-10 03:13:09 +02:00
Michael Natterer dac7201ead app: follow GEGL propertiy keys convention change
and clean up the magic a bit.
2014-05-16 03:10:01 +02:00
Michael Muré c2da46d810 app: adapt to the transform ops API change in GEGL 2013-06-06 19:58:48 +02:00
Nicolas Robidoux dc19ead94f Add the Nohalo sampler (previously called Lohalo, which now does something different 2012-12-31 15:27:07 -05:00
Michael Natterer 5b86b55e2a app: add gimp_gegl_get_op_enum_type() to get the GType of a gegl enum
and use it in convert-precision-dialog.c
2012-09-24 19:04:01 +02:00
Michael Natterer 373a4e7469 app: completely remove TileManager and friends (base/ and paint-funcs/)
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.
2012-06-20 21:44:09 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer e15702cbe5 app: create gimp-babl-compat.[ch] for gimp_babl_format_get_image_type()
and remove gimp_drawable_type().
2012-05-02 17:51:15 +02:00
Michael Natterer 5167550271 app: add GIMP_PRECISION_U16 and all needed 16 bit integer formats 2012-05-02 17:51:15 +02:00
Michael Natterer a34afd63d8 app: add GIMP_PRECISION_FLOAT and all its formats
Images in that format can't be created currently, the legacy code
crashes royally on it.
2012-05-02 17:51:11 +02:00
Michael Natterer 3af70584d0 app: remove bpp <-> format conversion stuff from gimp-gegl-utils.[ch]
Fix stuff by picking formats as we get data from the "outside", like a
GdkPixbuf, and pass around more proper formats from where we know them.
2012-05-02 17:51:08 +02:00
Michael Natterer ff931e1ded app: move gimp_babl_format_get_base_type() to gimp-babl.[ch]
The GimpImageBaseType enum is going to go away, but a format -> enum
API is going to stay around.
2012-05-02 17:51:08 +02:00
Michael Natterer 03da4fb280 app: make masks use linear, not gamma corrected formats 2012-05-02 17:51:08 +02:00
Michael Natterer 685a48d59a app: move gimp_gegl_buffer_get_temp_buf() to gimptempbuf.[ch] 2012-05-02 17:51:02 +02:00
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer 690a12f2a7 app: move gimp_temp_buf_create_buffer() to temp-buf.[ch]
TempBuf will soon be promoted to be a core/ citizen.
2012-05-02 17:50:59 +02:00
Michael Natterer 7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
Michael Natterer dd103d227b app: add gimp_babl_format_get_image_type,base_type() 2012-05-02 17:50:57 +02:00
Michael Natterer 72894671d5 app: fix gimp_gegl_color_new() to treat the passed GimpRGB as gamma corrected 2012-05-02 17:50:52 +02:00
Øyvind Kolås 6efd812d08 app: s/GIMP_GEGL_RECT/GEGL_RECTANGLE/
Defining GeglRectangle inline is so useful that it has been added to
GEGL.
2012-05-02 17:50:52 +02:00
Michael Natterer c5c555c834 app: add "take_ownerspip" param to gimp_temp_buf_create_buffer()
and get rid of some more intermediate buffer creation/destruction, and
some redundant temp_buf_free() plus g_object_unref().
2012-05-02 17:50:51 +02:00
Michael Natterer 42713a953b app: don't dup the TempBuf in gimp_temp_buf_create_buffer()
so this function now creates a buffer on a temp_buf is doesn't own.
2012-05-02 17:50:46 +02:00
Øyvind Kolås 76546f7e7c rename lanczos to lohalo
GEGL had a broken lanczos implementation, the lohalo implementation is better
anyways (at least when passed a proper scale matrix).
2012-05-02 17:50:38 +02:00
Øyvind Kolås ee97c1f4ff app: correct usage of babl formats
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.
2012-05-02 17:50:38 +02:00
Michael Natterer 315881065b app: add gimp_gegl_progress_connect()
which connects to notify::progress of the operation inside a node an
updates a GimpProgress accordingly.
2012-05-02 17:50:37 +02:00
Michael Natterer de0321a82e app: add gimp_gegl_node_set_layer_mode()
and remove all other code that does layer_mode -> node.
2012-05-02 17:46:13 +02:00
Michael Natterer 91c33799e4 app: use utility functions to create a GeglBuffer from a TempBuf
and to get it back from the buffer.
2012-05-02 17:46:11 +02:00
Michael Natterer cab21271fa app: add gimp_gegl_buffer_dup() which creates a TileManager backed dup 2012-05-02 17:46:06 +02:00
Michael Natterer 91ec2feb49 app: flush the buffer in gimp_gegl_buffer_get_tiles()
so the tiles are up-to-date.
2012-05-02 17:46:05 +02:00
Øyvind Kolås f8b1372038 app: make use of GIMP_GEGL_RECT in more places 2012-05-02 17:46:05 +02:00
Øyvind Kolås fe3220ae6f app: remove write property of GeglBuffer backend 2012-05-02 17:46:05 +02:00
Michael Natterer 1a1fd29982 app: add gimp_gegl_buffer_get_tiles() 2012-05-02 17:46:05 +02:00
Michael Natterer f5bfdde30a app: add gimp_gegl_buffer_new() to create a TileManager-backed buffer 2012-05-02 17:46:04 +02:00
Michael Natterer 69c52173fb app: change gimp_gegl_color_set_rgba() to gimp_gegl_color_new()
which saves one line of code in every single use case.
2012-05-02 17:46:03 +02:00
Michael Natterer 5933f222c9 app: add gimp_bpp_to_babl_format_with_alpha() 2012-05-02 17:45:58 +02:00
Michael Natterer b1da84f6fb app: correctly refcount the pixbuf in gimp_pixbuf_create_buffer() 2012-05-02 17:45:57 +02:00
Michael Natterer 553e65e859 app: add gimp_pixbuf_create_buffer() and use it in GimpBuffer 2012-05-02 17:45:57 +02:00
Michael Natterer d146cc40ea app: require a Babl for all buffers created on top of tiles
Fixes quite some introduced glitches with indexed mode because
the buffers use the right pixel format now.
2012-05-02 17:45:56 +02:00
Michael Natterer a898491b3f app: allow to "cast" a buffer's pixel format to another one
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.
2012-05-02 17:45:52 +02:00
Michael Natterer 0ae0dfb52e app: add a flatten meta-op and use it for layers and channels 2012-05-02 17:45:52 +02:00
Michael Natterer 77bbbab5c6 app: make sure TileManagers and the GeglBuffers backed by them are in sync
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.
2012-05-02 17:45:50 +02:00
Michael Natterer b95fc4f8d5 app: rename gimp_drawable_get_buffer() and gimp_tile_manager_get_gegl_buffer()
to foo_create_buffer() because they return new objects.
2012-05-02 17:45:47 +02:00
Øyvind Kolås 54e46f639c app: stop gimp_buffer_to_tiles use GeglBuffer 2012-05-02 17:45:47 +02:00
Michael Natterer 3bd8ee1a63 app: move new get_buffer() functions around; some general cleanup 2012-05-02 17:45:44 +02:00