Commit Graph

14 Commits

Author SHA1 Message Date
Michael Natterer a544ad4718 app: #include "gimpimage-color-profile.h" in gimplayer-new.c 2016-05-08 19:56:16 +02:00
Michael Natterer 5ec6d2c0f7 app: same fix as below in gimplayer-new.c
Don't use the (wrong) global display color managment switch to
determine whether or not to convert the buffer to the image's
profile. Use the image's "is color managed" switch.
2016-05-08 18:30:17 +02:00
Michael Natterer a33daf99fe libgimpcolor: rename RGB and GRAY gimp_color_profile_new_*() functions
to be more consistent, as discussed in bug #756389.
2015-12-15 20:42:21 +01:00
Michael Natterer 69abd4d972 app: add progress handling to gimp_gegl_convert_color_profile,transform() 2015-10-19 01:29:22 +02:00
Michael Natterer b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer dd8a822aae Bug 723392 - Pasting an image replaces color profile with default one
Use black point compensation when converting color profiles during
copy/paste and drag/drop.
2015-08-19 17:28:39 +02:00
Michael Natterer e8a5f285a7 app: change GimpBuffer to keep around an actual GimpColorProfile
not an icc_data blob. This simplifies the code using GimpBuffers
together with color profiles.
2015-08-16 13:14:56 +02:00
Michael Natterer b5264ec1be Bug 723392 - Pasting an image replaces color profile with default one
Make sure that paste buffers are always tagged with a profile. This
should fix copy and paste between gamma and linear images.
2015-08-15 19:15:14 +02:00
Michael Natterer 9cf455f915 app: use gimp_gegl_convert_color_profile() in gimp_layer_new_convert_profile() 2015-08-14 22:43:49 +02:00
Michael Natterer 875314dd19 Bug 723392 - Pasting an image replaces color profile with default one
gimp_layer_new_convert_profile(): if there is a profile, always use
lcms to copy between the buffers, to avoid the additional gamma
conversion gegl_buffer_copy/get() would do in some cases. This should
fix copying between linear and gamma images.
2015-08-14 18:03:31 +02:00
Michael Natterer e868cfeed8 Bug 723392 - Pasting an image replaces color profile with default one
In gimplayer-new.c, convert new layers to the image's profile if color
management is not disabled in prefs. This should convert pixels from
whatever source if they have a profile attached. If they don't have a
profile, no conversion is done. I'm not entirely sure if this
automatic conversion is always the right thing to do, please test.
2015-08-14 00:08:51 +02:00
Michael Natterer 09cd5f6720 app: add ICC data/length parameters to gimp_layer_new_from_gegl_buffer()
and pass them where we know the buffer could be from another image.
Pass "NULL, 0" if we know it's the same image.

Add gimp_layer_new_convert_profile() which takes the newly created
layer and the ICC data/length; call it from both
gimp_layer_new_from_gegl_buffer() and gimp_layer_new_from_pixbuf().

gimp_layer_new_convert_profile() is empty, this is just
infrastructure.
2015-06-20 00:39:44 +02:00
Michael Natterer 6446c007cf app: rename gimp_layer_new_from_buffer() to gimp_layer_new_from_gegl_buffer()
and add new function gimp_layer_new_from_buffer() which takes a
GimpBuffer. This will make sense soon :)
2015-06-20 00:02:11 +02:00
Michael Natterer db09d0f3d3 app: move functions to create layers to new files gimplayer-new.[ch] 2015-06-17 13:21:01 +02:00