[gimp/alxsa-store-cmyk-profile-tiff] plug-ins: Store CMYK profile in image on TIFF load
- From: Alx Sa <sawyeralex src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/alxsa-store-cmyk-profile-tiff] plug-ins: Store CMYK profile in image on TIFF load
- Date: Thu, 14 Jul 2022 03:29:12 +0000 (UTC)
commit 7ae837e02285fb4fcc727ea1870e4f0d3b8bc0d8
Author: Alx Sa <cmyk student gmail com>
Date: Thu Jul 14 03:29:12 2022 +0000
plug-ins: Store CMYK profile in image on TIFF load
Now that images can contain their simulation profile,
we can use gimp_image_set_simulation_profile() to retain
the CMYK profile when a TIFF image is loaded.
It will then be accessible in GIMP's Image menu.
plug-ins/file-tiff/file-tiff-load.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/plug-ins/file-tiff/file-tiff-load.c b/plug-ins/file-tiff/file-tiff-load.c
index d3113a6528..97b6440453 100644
--- a/plug-ins/file-tiff/file-tiff-load.c
+++ b/plug-ins/file-tiff/file-tiff-load.c
@@ -1014,7 +1014,6 @@ load_image (GFile *file,
space = gimp_color_profile_get_space (profile,
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
error);
- g_clear_object (&profile);
}
else
{
@@ -1181,6 +1180,13 @@ load_image (GFile *file,
}
}
+ /* attach CMYK profile to GimpImage if applicable */
+ if (profile && gimp_color_profile_is_cmyk (profile))
+ {
+ gimp_image_set_simulation_profile (*image, profile);
+ g_clear_object (&profile);
+ }
+
/* attach non-CMYK color profile */
if (profile)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]