[gegl] bin: color manage display of gegl binary
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] bin: color manage display of gegl binary
- Date: Tue, 10 Jul 2018 07:41:34 +0000 (UTC)
commit 9c671d33c26b16324f6c765fa21cb23989b7d714
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Jul 10 09:40:19 2018 +0200
bin: color manage display of gegl binary
bin/mrg-gegl.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/bin/mrg-gegl.c b/bin/mrg-gegl.c
index 7ced6ec2a..acb2411ea 100644
--- a/bin/mrg-gegl.c
+++ b/bin/mrg-gegl.c
@@ -102,7 +102,15 @@ void mrg_gegl_blit (Mrg *mrg,
static const Babl *fmt = NULL;
foo++;
- if (!fmt) fmt = babl_format ("cairo-RGB24");
+ if (!fmt)
+ {
+ int icc_length = 0;
+ unsigned const char *icc_data = mrg_get_profile (mrg, &icc_length);
+ const Babl *space = NULL;
+ if (icc_data)
+ space = babl_icc_make_space ((void*)icc_data, icc_length, BABL_ICC_INTENT_RELATIVE_COLORIMETRIC,
NULL);
+ fmt = babl_format_with_space ("cairo-RGB24", space);
+ }
gegl_node_blit (node, scale / fake_factor, &roi, fmt, buf, width * 4,
GEGL_BLIT_DEFAULT);
surface = cairo_image_surface_create_for_data (buf, CAIRO_FORMAT_RGB24, width, height, width * 4);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]