[gimp] Issue #3193: Wrong colors after exporting 8bpc RGB png from 32f...
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #3193: Wrong colors after exporting 8bpc RGB png from 32f...
- Date: Fri, 12 Apr 2019 12:35:59 +0000 (UTC)
commit c5fae74ac1c70eb4789e7aaacd4d216b74878b78
Author: Jehan <jehan girinstud io>
Date: Fri Apr 12 14:33:19 2019 +0200
Issue #3193: Wrong colors after exporting 8bpc RGB png from 32f...
... linear XCF.
When choosing a specific pixel format (other than "Automatic"), we
always export as non-linear. Therefore if we were going to save a linear
profile, make sure we also convert it to sRGB too.
plug-ins/common/file-png.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 3c48584d65..236d36b360 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -1744,6 +1744,14 @@ save_image (const gchar *filename,
bit_depth = 16;
break;
}
+ if (linear && profile)
+ {
+ GimpColorProfile *saved_profile;
+
+ saved_profile = gimp_color_profile_new_srgb_trc_from_color_profile (profile);
+ g_object_unref (profile);
+ profile = saved_profile;
+ }
}
bpp = babl_format_get_bytes_per_pixel (file_format);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]