[gimp] Bug 662739 - Port to lcms2 for icc V4 profile support
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 662739 - Port to lcms2 for icc V4 profile support
- Date: Sun, 25 Nov 2012 19:21:57 +0000 (UTC)
commit d7ca2da6cec78b669bc5d8fd87f22e941f4b5f6d
Author: Michael Natterer <mitch gimp org>
Date: Sun Nov 25 20:21:11 2012 +0100
Bug 662739 - Port to lcms2 for icc V4 profile support
Fix undo in the lcms plugin.
plug-ins/common/lcms.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c
index 5b514c6..5fe69fe 100644
--- a/plug-ins/common/lcms.c
+++ b/plug-ins/common/lcms.c
@@ -1048,7 +1048,8 @@ lcms_image_transform_rgb (gint32 image,
if (transform)
{
- GeglBuffer *buffer;
+ GeglBuffer *src_buffer;
+ GeglBuffer *dest_buffer;
GeglBufferIterator *iter;
gint layer_width;
gint layer_height;
@@ -1058,22 +1059,29 @@ lcms_image_transform_rgb (gint32 image,
gint count = 0;
gint done = 0;
- buffer = gimp_drawable_get_buffer (layer_id);
- layer_width = gegl_buffer_get_width (buffer);
- layer_height = gegl_buffer_get_height (buffer);
+ src_buffer = gimp_drawable_get_buffer (layer_id);
+ dest_buffer = gimp_drawable_get_shadow_buffer (layer_id);
+ layer_width = gegl_buffer_get_width (src_buffer);
+ layer_height = gegl_buffer_get_height (src_buffer);
- iter = gegl_buffer_iterator_new (buffer, NULL, 0, iter_format,
- GEGL_BUFFER_READWRITE,
- GEGL_ABYSS_NONE);
+ iter = gegl_buffer_iterator_new (src_buffer, NULL, 0,
+ iter_format,
+ GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
+
+ gegl_buffer_iterator_add (iter, dest_buffer, NULL, 0,
+ iter_format,
+ GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
cmsDoTransform (transform,
- iter->data[0], iter->data[0], iter->length);
+ iter->data[0], iter->data[1], iter->length);
}
- g_object_unref (buffer);
+ g_object_unref (src_buffer);
+ g_object_unref (dest_buffer);
+ gimp_drawable_merge_shadow (layer_id, TRUE);
gimp_drawable_update (layer_id, 0, 0, layer_width, layer_height);
if (count++ % 32 == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]