Commit Graph

691 Commits

Author SHA1 Message Date
Alexia Death 8cfabf7e60 app: fix gegl convolve to actually write back the result when not in alpha weighted mode 2014-11-12 15:27:11 +02:00
Michael Natterer 2b1735f784 app: move gimp_file_compare() to gimp-utils.[ch]
It's a GCompareFunc to be used for finding GFiles in lists.
2014-08-02 15:07:26 +02:00
Michael Natterer 328e4eff18 app: add gimp_progress_set_text_literal()
and use it instead of set_text (progress, "%s", literal_message);
2014-07-20 23:32:19 +02: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 3f52828896 app: change GimpImageFile and GimpDocumentList to speak GFile 2014-07-07 23:58:11 +02:00
Michael Natterer b5530e9e3d Use the new GeglAccessMode enum instead of the old values 2014-07-02 02:00:35 +02:00
Michael Henning db4f67048d app: Always return values in non-void functions. 2014-06-29 22:35:34 -04:00
Michael Natterer 16381c9bf9 app: make gimp_gegl_apply_cached_operation() cancelable via GimpProgress
In gimp_drawable_merge_filter(), use that feature to make filter
applying cancelable. Stop projection rendering first, because we have
to run the event loop manually in order to receive input for
canceling, but we don't want the projection to be constructed from
that manual loop running.
2014-06-30 00:10:25 +02:00
Michael Natterer 88450445fc app: don't unref progress twice in gimp_gegl_apply_cached_operation() 2014-06-19 23:09:41 +02:00
Michael Natterer db2ea536da app: add an optional gegl:cache at the output of GimpApplicator
Add "gboolean use_cache" to gimp_applicator_new(). Don't use a cache
anywhere but in GimpImageMap because it incrementally fills that cache
via the projection update. In gimp_drawable_merge_filter(), get that
cache and pass it to gimp_gegl_apply_cached_operation() which then
avoids doing the work twice for the already cached results. Win!
2014-06-18 18:50:53 +02:00
Michael Natterer 14614cb349 app: add gimp_gegl_apply_cached_operation()
which does the same as gimp_gegl_apply_operation() but takes
additional arguments which are a cache buffer and a list of rectangles
that specify the already computed region in the cache buffer.
2014-06-18 18:42:17 +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 987d9e2800 app: add a gegl:copy-buffer to GimpApplicator
which allows to get a buffer copy of the result of the applied
operation without the overhead of running the entire graph again just
for this purpose.
2014-06-01 18:35:18 +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 Natterer 2acbf8a70f Bug 730071 - Selection bounds miscalculated for multiples of 128
gimp_gegl_mask_bounds(): when we succeed avoiding iterating a tile by
checking its upper-left and bottom-right, use the function's internal
meaning of x2, y2, which is the rightmost/bottommost selected pixel,
while the external meaning is the pixel right/below it.
 Short: use "foo - 1" not "foo".
2014-05-13 21:46:31 +02:00
Michael Natterer 22c222291d libgimpbase,*: clean up enum values in gimpbaseenums.h
GIMP_ADD_foo_MASK -> GIMP_ADD_MASK_foo
GIMP_foo_MODE -> GIMP_BLEND_foo
GIMP_foo_CLONE -> GIMP_CLONE_foo
GIMP_foo -> GIMP_DODGE_BURN_TYPE_foo
GIMP_foo -> GIMP_TRANSFER_foo

Add compat values for the old names and compat code to script-fu
and pygimp.
2014-04-29 20:58:30 +02:00
Michael Natterer 3c918353fb app: add double precision support, for completeness
and because it makes us look utterly cool.
2014-03-09 00:43:55 +01:00
Michael Natterer 30ae88ef07 Bug 725556 - Feather selection extremely slow
gimp_gegl_apply_feather(): add a "dest_rect" parameter to restrict
the feather area. Pass the selection bounds plus the feather radius.

For consistency, newly add gimp_gegl_apply_border,grow,shrink() and use
them in gimpchannel.c
2014-03-04 22:11:50 +01:00
Michael Natterer 6e4f9185be Bug 725112 - Small canvas doesn't update when zoomed out
gimp_tile_handler_projection_invalidate(): need to invalidate
all levels up to max_z not max_z - 1. Spotted by Massimo.
2014-03-04 19:32:14 +01:00
Michael Natterer 4be11a8c0e Bug 725112 - Small canvas doesn't update when zoomed out
Remove all code that tries to calculate the maximum level of the tile
pyramid, because that's essentially impossible. Instead simply keep
track of the max_z encountered in GeglTileSource::command().
2014-02-28 23:05:02 +01:00
Daniel Sabo db52f88308 app: Set Gimp specific TileHandler properties
Remove a dependency on GEGL setting Gimp specific properties
on custom tile handlers.
2014-02-02 02:12:02 -08:00
Daniel Sabo 71bddaa23c app: Remove deprecated "babl-tolerance" setting 2013-10-19 17:02:04 -07:00
Michael Natterer 41c92af49b app: add gimp_gegl_node_set_color() and use it in GimpChannel 2013-10-19 17:31:56 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer b5ff4fbab4 app: support src ops in gimp_gegl_apply_operation() 2013-09-13 09:42:53 +02:00
Daniel Sabo 34c50b0fea app, plug-ins: Don't modify iter->length
The new by-row iteration doesn't re-write the length
value for each row. In general it is not safe to modify
the iterator data because the internal logic depends
on the public data, but this specific case is new.
2013-09-12 17:43:54 -07:00
Massimo Valentini dae8291065 app: do not recurse to invalidate the pyramid 2013-08-10 16:24:16 +02:00
Michael Natterer b44ffdd198 app: add gimp_tile_handler_projection_undo_invalidate()
which removes a rectangle from the handler's dirty region, for cases
where the caller knows that the rectangle has been explicitly
constructed. Only needed by the gtk3-port branch.
2013-08-02 20:19:00 +02:00
Ville Sokk 9daf2b8443 app: remove flush parameter from write-buffer op in GimpApplicator 2013-07-06 21:24:12 +03:00
Michael Natterer f56f6d1255 app: follow the GEGL invert -> invert-linear vs. invert-gamma change
and invert masks using invert-linear and other drawables using
invert-gamma. drawable_invert_cmd_callback() still always uses
invert-gamma even though it can be used on layer masks.
2013-06-24 00:45:04 +02:00
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
  GimpPrecision enum values is loaded correctly

This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Michael Natterer 150a3e9c7e app: don't run graphs that read and write the same buffer
Work around artifacts at processing chunk borders by dup()ing the
source buffer. See bug #701875.
2013-06-18 08:06:24 +02:00
Michael Natterer 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
Michael Natterer d6b3a81821 app: add gimp_babl_print_pixel (format, pixel)
which returns a NULL-terminated string array with the pixels's
components, converted to text in the current locale.
2013-06-10 00:30:18 +02:00
Michael Henning 87bcc4aa3d app: Use gegl:scale-ratio instead of the deprecated gegl:scale 2013-06-09 15:10:15 -04:00
Michael Muré c2da46d810 app: adapt to the transform ops API change in GEGL 2013-06-06 19:58:48 +02:00
Michael Natterer 30e1f39ba6 app: remove support for the old GeglConfig:cache-size property 2013-06-06 00:03:26 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 260c62ed94 app: don't pass "hard-edges" to the transform ops, it's gone 2013-06-04 01:16:13 +02:00
Michael Natterer 1cc9d7d7aa app: add "Use OpenCL" toggle to Prefs -> Environment
and configure GEGL accordingly. Let's see if it's really runtime
switchable :)
2013-06-01 23:04:03 +02:00
Daniel Sabo 8d88b71fad Implement gimp_drawable_get_linear 2013-04-30 15:36:22 -07:00
Michael Natterer 9c93df2d4b app: add gimp_drawable_get_linear() which currently always returns FALSE
Add "linear" parameter to GimpApplicator. Pass the drawable's "linear"
to the applicator, and to all calls to gimp_gegl_mode_node_set_mode(),
instead of hardcoding FALSE everywhere.
2013-04-27 08:41:06 +02:00
Michael Natterer eafcc4801c app: accidentially removed a function's return type 2013-04-27 08:23:58 +02:00
Michael Natterer a93eaa9122 app: set paint_mode and opacity separately on mode nodes
so we don't constantly change the operation only because the opacity
varies during painting.
2013-04-22 22:53:07 +02:00
Michael Natterer 72a32dd79f app: allow a NULL src_buffer in gimp_gegl_apply_operation()
in which case the function just does nothing on the passed operation's
input and expects it to be already conntected to something. Also allow
to pass an operation that is already part of another graph.
2013-04-22 10:55:09 +02:00
Michael Natterer c20838fa26 app: add gimp_applicator_dup_apply_buffer()
which copies a rectangle of the layer mode node's "aux" input into
a newly allocated buffer.
2013-04-22 10:54:05 +02:00
Michael Natterer e3557ac3a5 app: remove gimp_gegl_create_apply_[buffer_]node() 2013-04-17 16:21:15 +02:00
Michael Natterer 69a321ac29 app: turn GimpApplicator into a general-purpose "input + aux -> output" thing
which means adding a lot of proper API. Input, output and aux can be
pads or buffers. Make sure it uses the minimum possible graph in all
cases and doesn't reconfigure nodes unless needed. Port GimpPaintCore
to the new API.
2013-04-14 22:44:21 +02:00
Michael Natterer 670fa2d670 app: add gimp_gegl_create_apply_node()
which is simply a more general version of
gimp_gegl_create_apply_buffer_node()
2013-04-12 14:34:20 +02:00
Michael Natterer ddc4a057e4 app: factor our more lowlevel GimpChannel code to GeglBuffer utils 2013-04-09 00:38:46 +02:00
Michael Natterer 5cd8b98efb app: factor out the core mask combine functions to gegl-only functions
so we can use them on plain GeglBuffers. Use them in
gimpchannel-combine.c for now.
2013-04-08 21:54:46 +02:00
Michael Natterer 586bb73293 app: add gimp_gegl_apply_feather()
and use it in gimp_channel_real_feather() so the magic factor of 3.5
to turn feather radius into gegl:gaussian-blur's std_dev is hidden
behind an API.
2013-04-08 14:16:33 +02:00
Michael Natterer 1a23ceaa21 app: update GimpTileHandlerProjection's max_z when a propertiy changes
not for each gimp_tile_handler_projection_invalidate() call.
2013-04-01 01:26:43 +02:00
Michael Natterer 06968d9bf9 Bug 690325 - Image Display broken: a rectangle undrawn to the top left
Let GimpTileHandlerProjection know how large the projection is so it
can calculate the number of levels in the pyramid, and always
invalidate all levels.
2013-03-30 17:44:59 +01:00
Michael Natterer a6862af834 app: shorten the labels of the cage tool options by adding newlines
This is an exception because the tool only has three option widgets.
2013-03-24 22:11:20 +01:00
Michael Natterer 4f7cb88132 app: implement GimpConfigInterface::equal() in gimp-gegl-config-proxy.c
so the automatically saved timestamped presets don't fill up with
duplicates of identical settings. The default impl considers them
different because of their timestamps.
2013-03-12 19:09:22 +01:00
Michael Natterer a66de41f60 app: use the right enum for gegl_node_blit() (no logic changed) 2013-03-04 14:02:33 +01:00
Michael Natterer d0ef6a5af6 app: use gegl_node_blit() in GimpApplicator too
Speeds up applying by at least a factor of two. Patch from Massimo.
2013-03-02 18:50:34 +01:00
Michael Natterer dfeb16d9ee app: don't use a GeglProcessor when we don't need a progress
Instead, use gegl_node_blit() directly which is more than ten times
faster in gimp_gegl_apply_operation(). Patch from Massimo Valentini.
2013-03-02 18:32:34 +01: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 68de31bd64 app: port gimp_gegl_convolve() to float 2012-12-19 01:03:13 +01:00
Michael Natterer 12a9f01139 app: fix off-by-one over-invalidation in GimpTileHandlerProjection
It sometimes invalidated entire rows/columns of tiles too much.
2012-12-15 19:25:42 +01:00
Michael Natterer 9b6703371e app: remove premultiplied blending code from the few ops that had it
Change GimpOperationPointLayerMode's "premultiplied" to "linear" and
set format to "RGBA float" if it's TRUE. Everything defaults to FALSE
so nothing changes.
2012-12-13 22:58:38 +01:00
Michael Natterer 084ba8f84f app: port smudge blending to RGBA float 2012-12-08 22:16:05 +01:00
Daniel Sabo 4c7dc6a494 app: cache values to speed up GEGL paintbrush
Cache values in GimpApplicator to avoid the overhead of gegl_node_set().
Don't reallocate paint_core->paint_buffer if it's already the correct size.
2012-12-08 19:54:24 +01:00
Michael Natterer 2e54d88ef2 app: fix the babl model of the "A u16" format
makes babl stats crash one line later...
2012-12-03 23:04:52 +01:00
Michael Natterer 435df29d85 app: add utility functions for applying specific operations to buffers
so gimp_gegl_apply_foo() will run "gegl:foo" with the required
properties on a buffer and write the result to another buffer.
2012-10-31 23:47:45 +01:00
Michael Natterer eb89a545d5 app: move core/gimp-apply-operation.[ch] to gegl/gimp-gegl-apply-operation.[ch] 2012-10-22 16:03:40 +02:00
Michael Natterer c9e788c39d app: add gimp_babl_mask_format(precision) 2012-09-27 23:50:20 +02: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
Øyvind Kolås 20094807c8 app: gimp-babl.c fix formatting 2012-09-22 17:54:38 +01:00
Øyvind Kolås 594b4bcdef app: use sRGB gamma in u16 precision
This permits editing sRGB profile PNGs and other formats using sRGB storage,
without this editing a 16bit bpc PNG in u16 mode would cause banding in the
shadow areas on import. File that do not have an sRGB like gamma should be
promoted to a higher bit-depth on import.
2012-09-22 17:47:43 +01:00
Michael Natterer 52af6e3f3f app: fix the code that sets the 64bit tile cache size on GeglConfig 2012-09-18 20:07:13 +02:00
Michael Natterer b70b04c624 app: formatting in GimpApplicator 2012-08-26 22:52:04 +02:00
Ville Sokk d5dfd414b3 app: don't flush the gegl file backend when painting 2012-08-13 12:37:50 +03:00
Michael Natterer 6b6d39fc64 app: add GimpTileHandlerProjection and use it to validate the projection
as the projection buffer is being read from. Projection performance is
now back at its old speed.
2012-07-05 21:42:26 +02:00
Michael Natterer 5c11326ad7 app: use GeglConfig's new 64 bit tile-cache-size property if it exists 2012-06-29 01:51:56 +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
Ville Sokk 83680825d0 app: removed unnecessary argument from gimp_operations_init 2012-06-14 21:29:43 +03:00
Michael Natterer e254fd7c4d app: actually commit the rest of the patch... 2012-05-26 12:42:52 +02:00
Michael Natterer 49b579eeb8 app: add GimpApplicator which wraps a graph that applies a buffer to a drawable
and use it in GimpPaintCore, instead of calling
gimp_drawable_apply_buffer() which sets up a new graph for each
call. Makes painting speed bearable again.
2012-05-26 12:36:00 +02:00
Michael Natterer 85a92cf800 app: don't set GeglConfig:threads, it breaks things 2012-05-20 19:35:04 +02:00
Michael Natterer 120db980dc app: connect GimpGeglConfig:num-processors to GeglConfig:threads
whatever it might be good for...
2012-05-19 08:50:05 +02:00
Michael Natterer 83a728f492 app: rename gimp_gegl_node_set_layer_mode() to gimp_gegl_mode_node_set()
and have it set mode and opacity at the same time, so we don't reset
opacity each time we set the mode.
2012-05-18 23:50:35 +02:00
Michael Natterer 001e0f0b40 app: port gimp_gegl_create_apply_buffer_node() to the new mode ops 2012-05-18 22:59:04 +02:00
Ville Sokk e377eb01cd app: modified gegl blending modes to take mask and opacity inputs 2012-05-18 22:52:48 +02:00
Michael Natterer 9d1ff75c61 app: limit the tile-cache size to G_MAXINT also in the UI
and #warning about it in the code until GEGL has a guint64 cache size
property.
2012-05-15 02:29:47 +02:00
Michael Natterer ede421bd45 app: rename GimpBaseConfig to GimpGeglConfig
because that's its future purpose.
2012-05-14 22:57:58 +02:00
Ville Sokk cf442d3386 app: added gegl value and behind blending modes 2012-05-11 20:37:47 +03:00
Ville Sokk c713e80e63 app: added initial gegl color blending mode 2012-05-11 18:53:49 +03:00
Ville Sokk cc0410a226 app: added initial gegl version of saturation blending mode 2012-05-11 18:28:49 +03:00
Michael Natterer f8f00600d5 app: remove the GimpTileBackendTileManager typedef from gimp-gegl-types.h
It's a private temporary class and doesn't belong there.
2012-05-11 11:13:26 +02:00
Michael Natterer 1a624d4df4 app: remove many includes of "gegl/gimp-gegl-utils.h" 2012-05-10 23:12:39 +02:00
Michael Natterer 43dc848dfb app: remove duplicate typedefs from gimp-gegl-types.h 2012-05-10 21:31:40 +02:00
Michael Natterer 7101ee191a app: move all GEGL operations to new directory app/operations/ 2012-05-10 21:22:44 +02:00
Ville Sokk c41ac185b5 app: added initial gegl hue blending mode 2012-05-10 21:54:48 +03:00
Simon Budig 8482fb9cf6 fix NaN issue in gimpoperationlevels.c 2012-05-09 02:24:12 +02:00
Michael Natterer 87e266a94b app: port gimp_gegl_replace() to float 2012-05-07 02:35:21 +02:00
Michael Natterer dd9b132d8f app: add a new gimp_gegl_combine_mask() which does what it says
which is combining two masks. Use it in gimp_drawable_real_replace_buffer()
instead of gimp_gegl_apply_mask() which does the wrong thing.
2012-05-06 22:51:11 +02:00
Michael Natterer 5738c866a1 app: rename gimp_gegl_combine_mask() to gimp_gegl_combine_mask_weird()
because it is.
2012-05-06 22:51:11 +02:00
Michael Natterer b2c4bd5d3f app: add gimp_gegl_replace() as replacement for combine_regions_replace()
and use it in gimp_drawable_real_replace_buffer(). The new GEGL loop
is a stupid 1:1 copy of legacy and needs improvement.
2012-05-06 22:51:11 +02:00
Michael Natterer 89dcc5be57 app: oops should also commit the new op files 2012-05-05 03:04:06 +02:00
Michael Natterer f1a771439a Replace the semi-flatten plug-in by a GEGL operation 2012-05-04 23:56:10 +02:00
Michael Natterer c16c61f458 app: support GimpParamSpecRGB in generated GEGL UI, not only GeglParamSpecColor 2012-05-04 23:56:10 +02:00
Michael Natterer f24445efbc Replace the threshold-slpha plug-in by a GEGL operation 2012-05-04 17:59:36 +02:00
Michael Natterer cdb79427cb app: move the opaque typedefs of most operations to their resp. headers
Keeping them in gimp-gegl-types.h makes no sense because they are
never included by anyone, let alone mentioned in other headers.
2012-05-04 17:36:39 +02:00
Michael Natterer 84745b48e8 app: add a color button and picker to the colorize tool dialog 2012-05-03 15:02:34 +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 58324ab239 app: kill more clamping in a levels utility function 2012-05-02 17:51:23 +02:00
Michael Natterer b9db13e4fc app: fix GimpOperationReplaceMode to not do two things different than legacy 2012-05-02 17:51:23 +02:00
Michael Natterer 49175a2d1b app: remove clamping from GimpOperationLevels, it was at a fishy place anyway 2012-05-02 17:51:22 +02:00
Ville Sokk c5d7aaf52e app: added gegl erase mode 2012-05-02 17:51:20 +02:00
Ville Sokk 0ac531fa3b app: fixed a bug in gegl legacy blending modes 2012-05-02 17:51:19 +02:00
Michael Natterer 1badcb7ce9 app: add GIMP_PRECISION_U32 and all its formats 2012-05-02 17:51:19 +02:00
Michael Natterer 926f746b66 app: add gimp_babl_compat_u8_format() instead of having this code 5 times 2012-05-02 17:51:18 +02:00
Michael Natterer 2e7944cad0 app: add GIMP_PRECISION_HALF for 16 bit floating point
and use babl_format_get_palette() to simplify some code.
2012-05-02 17:51:18 +02:00
Øyvind Kolås a539878bc4 app: set default tilemul for gimpgegltilebackend to 2 2012-05-02 17:51:18 +02:00
Michael Natterer d81ea1315e app: implement active, affected components in GEGL
Add GimpOperationMaskComponents, enum GimpComponentMask, and image and
drawable infrastructure to get the right mask, and plug the mask
operation into gimp_gegl_create_apply_buffer_node().
2012-05-02 17:51:17 +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 85ee13dd7d app: don't crash GimpOperationReplaceMode is mask is NULL 2012-05-02 17:51:14 +02:00
Michael Natterer 32f6015898 app: change replace's "opacity" property from float to double 2012-05-02 17:51:14 +02:00
Ville Sokk 753bc23834 app: new gegl replace mode that uses mask and opacity inputs 2012-05-02 17:51:14 +02:00
Michael Natterer 0011fe5c50 app: special case REPLACE_MODE in gimp_gegl_create_apply_buffer_node()
it needs the mask/opacity on a separate input.
2012-05-02 17:51:14 +02:00
Ville Sokk 7eb0d8f4c8 app: added initial gegl replace mode 2012-05-02 17:51:13 +02:00
Michael Natterer 4772d3e832 app: add gimp_gegl_combine_mask() and use it in GimpPaintCore 2012-05-02 17:51:12 +02:00
Michael Natterer c07790fa54 app: add gimp_gegl_apply_mask() and use it in GimpPaintCore 2012-05-02 17:51:12 +02:00
Michael Natterer a295589157 app: enable blur/sharpen via GimpConvolve on indexed drawables 2012-05-02 17:51:12 +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 8a55b13577 app: add gimp_babl_component_format() and use it in GimpImage 2012-05-02 17:51:10 +02:00
Michael Natterer 4f83ca48dc app: add missing formats to gimp_babl_get_description() 2012-05-02 17:51:09 +02:00
Michael Natterer 678255604d app: add a GimpPrecision enum that for now contains GIMP_PRECISION_U8
Add gimp_image_get_precision(), and a "precision" argument to
gimp_babl_format(). Change code accordingly and do some more format
related cleanups.
2012-05-02 17:51:09 +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 15d1827ead app: add gimp_babl_format() and use it in gimp_image_get_format() 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 e737bf77fa app: add gimp-babl.[ch] and move Babl specific code there 2012-05-02 17:51:08 +02:00
Ville Sokk c291524e6c app: added hard light, difference, subtract, grain extract, grain merge and difference gegl blending modes 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 3e9fdf1815 app: change GimpBoundary to find the boundary a float component
Require passing in a Babl format that will extract the float component
the algorithm should run on.
2012-05-02 17:51:07 +02:00
Michael Natterer 3ea0e3f090 app: return double not int from GimpPickable::get_opacity_at()
and fix GimpLayer's impl to honor the mask also for layers without
alpha.
2012-05-02 17:51:07 +02:00
Michael Natterer 53bda86ceb app: code cleanup in the GEGL ops 2012-05-02 17:51:06 +02:00
Ville Sokk c24d9d76e5 app: added addition, burn, darken only, dodge, multiply, overlay, screen and soft light gegl blending modes 2012-05-02 17:51:06 +02:00
Ville Sokk 0233c99c8b app: cleaned dissolve and lighten only modes 2012-05-02 17:51:06 +02:00
Michael Natterer 266b0d069c app: require R'G'B'A u8 in gimp_gegl_smudge_blend() and simplify it massively 2012-05-02 17:51:06 +02:00
Michael Natterer c3ceb8698d app: add gimp_gegl_smudge_blend(), a brute-force port of blend_region()
and use it in GimpSmudge. This only to get functionality ported and
the API done, and not the final state.
2012-05-02 17:51:05 +02:00
Ville Sokk e4d97f9a95 app: added gegl version of lighten only blending mode 2012-05-02 17:51:05 +02:00
Michael Natterer a04d391ca6 app: more WIP on GimpOperationHistogramSink, not used yet 2012-05-02 17:51:04 +02:00
Michael Natterer 927ef9b9fb app: use gimp_gegl_color_new() instead of gegl_color_set_rgba() 2012-05-02 17:51:04 +02:00
Michael Natterer cadd54823b app: clean up and build the histogram op gift 2012-05-02 17:51:04 +02:00
Øyvind Kolås ad8b16e6ad app: histogram sink skeleton gift for mitch 2012-05-02 17:51:04 +02:00
Michael Natterer 310c1bfb71 app: add gimp_babl_get_description()
which keeps around human readable and translatable strings for Babl
formats, as replacement for the to-be-obsoleted image type etc. enum
descriptions.
2012-05-02 17:51:03 +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 105d2207ef app: require a non-NULL format in gimp_tile_manager_create_buffer() 2012-05-02 17:50:56 +02:00
Michael Natterer 1f9606e200 app: fix non-premultiplied case in GimpOperationNormalMode 2012-05-02 17:50:55 +02:00
Michael Natterer 7fbbefd6f0 app: set the mode on the right node in gimp_gegl_create_apply_buffer_node() 2012-05-02 17:50:55 +02:00
Michael Natterer 6c83b0327d app: fix mode node creation in gimp_gegl_create_apply_buffer_node() 2012-05-02 17:50:55 +02:00
Michael Natterer 9113a59267 app: remove CONSTRUCT_ONLY from "premultiplied" of GimpOperationPointLayerMode
not because we want to change it after construction, but because it is
ugly to avoid setting it again in the generic "configure mode node" code.
2012-05-02 17:50:54 +02:00
Michael Natterer 2ea74df523 app: gimp_gegl_convolve() rename parameter "matrix" to "kernel" 2012-05-02 17:50:54 +02:00
Michael Natterer 91c39463c4 app: port XCF loading to writing to the drawable's GeglBuffer 2012-05-02 17:50:53 +02:00
Michael Natterer 3e140fd105 app: factor out GimpPlugIn's tile access emulation code to app/gegl/
so it can be used to access a GeglBuffer's "tiles" in the XCF code.
2012-05-02 17:50:53 +02:00
Michael Natterer 08d179acc6 app: add gimp_gegl_dodgeburn() to replace the lut in GimpDodgeBurn 2012-05-02 17:50:52 +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 2d401aaaac app: add gimp-gegl-loops.[ch] which for now contains a convolve function 2012-05-02 17:50:51 +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
Øyvind Kolås 2aa401e9db app: dissolve-mode op attribute Helvetix Victorinox 2012-05-02 17:50:50 +02:00
Øyvind Kolås 925f49c489 app: gegl-config babl-tolerance
Lower the precision further, we're still doing it at higher precision than
8bit but since GIMP itself is still only dealing with 8bit data we can permit
these shortcuts for adding and removing gamma without affecting the fidelity
of the produced results.
2012-05-02 17:50:50 +02:00
Øyvind Kolås 1b64710e66 app: specify a lower tolerance for babl
Permitting the use of LUT based functions for gamma conversions in float32.
2012-05-02 17:50:49 +02:00
Michael Natterer dd70bbc6ed app: add gimp_gegl_get_config_container()
which creates and keeps around containers of arbitrary config objects.
2012-05-02 17:50:49 +02:00
Øyvind Kolås 671164a0fe app: gegl dissolve layer-mode pedantic indentation 2012-05-02 17:50:48 +02:00
Øyvind Kolås 3b043a1597 app: the dissolve op now matches pixel perfectly 2012-05-02 17:50:48 +02:00
Øyvind Kolås 77f7b31fa3 app: fix up dissolve mode
It produces some garbage, but it is 99.5% compliant with the output of legacy
gimp dissolve mode now.
2012-05-02 17:50:48 +02:00
Michael Natterer 66fa85ad27 app: fixed GimpOperationDissolveMode by Ville Sokk 2012-05-02 17:50:47 +02:00
Michael Natterer 2957795372 app: add gimp_gegl_node_set_matrix() and use it instead of manual fiddling 2012-05-02 17:50:46 +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
Michael Natterer 8bc6f1ee09 app: add parent_type parameter to gimp_gegl_get_config_proxy()
and derive from that type. Use GimpImageMapConfig as base class for
GimpOperationTool's config.
2012-05-02 17:50:42 +02:00
Øyvind Kolås 49de3d5292 app: follow changes in GeglOperation API 2012-05-02 17:50:42 +02:00
Michael Natterer f248324fd3 app: remove the lagacy hue-saturation cruft
it's unclear whether the operation is correct, but that can be sorted
out on master and merged.
2012-05-02 17:50:40 +02:00
Øyvind Kolås e540444b56 app: fix registration of babl formats 2012-05-02 17:50:38 +02:00
Øyvind Kolås 69cd6d033a app: fix registration of babl_format("A u8") 2012-05-02 17:50:38 +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 2c0fde88f2 app: remove the legacy color-balance cruft 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 b1591fccc7 app: switch to gegl_buffer_sample() in GimpOperationShapeburst
and fix the progress fractions.
2012-05-02 17:50:37 +02:00
Michael Natterer 865b925598 app: add GimpOperationShapeburst to calculate the distance map for blend 2012-05-02 17:50:36 +02:00
Michael Natterer 726d3c980c app: factor out gimp_gegl_config_proxy_sync() from GimpGeglTool 2012-05-02 17:46:16 +02:00
Michael Natterer fd033afe11 app: factor out the creation of GeglOperation config proxy objects 2012-05-02 17:46:15 +02:00
Michael Natterer efbc4e61b0 app: more gegl_buffer_iterator_new() updates 2012-05-02 17:46:15 +02:00
Øyvind Kolås f68c3c7051 app: adapt to API changes in GEGL 2012-05-02 17:46:15 +02:00
Michael Natterer b08ba684cf app: replace border_region() by GimpOperationBorder 2012-05-02 17:46:14 +02:00
Michael Natterer 8fc7c17d39 app: replace fatten_region() by GimpOperationGrow 2012-05-02 17:46:14 +02:00
Michael Natterer 30baaded87 app: clean up the new shrink op 2012-05-02 17:46:14 +02:00
Michael Natterer be853cd239 app: remove "gboolean linear" from all apply_operation APIs
thes were all unused and we want to get rid of that anyway.
2012-05-02 17:46:13 +02:00
Michael Natterer cbb2766f07 app: add GimpOperationShrink which does "shrink selection"
but it's horribly slow, so keep the old code around for now and make
the new one depend on use_gegl.
2012-05-02 17:46:13 +02:00
Øyvind Kolås c872a9368e app: sprinkle level argument over process functions 2012-05-02 17:46:13 +02:00