[gimp] app: simplify gimp_image_new_from_drawable()'s color profile code
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: simplify gimp_image_new_from_drawable()'s color profile code
- Date: Sun, 16 Aug 2015 17:45:46 +0000 (UTC)
commit cd0762716726240768757fa9080f656f163821ab
Author: Michael Natterer <mitch gimp org>
Date: Sun Aug 16 19:45:04 2015 +0200
app: simplify gimp_image_new_from_drawable()'s color profile code
app/core/gimpimage-new.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/app/core/gimpimage-new.c b/app/core/gimpimage-new.c
index 9fd97c3..9fdb868 100644
--- a/app/core/gimpimage-new.c
+++ b/app/core/gimpimage-new.c
@@ -193,12 +193,8 @@ gimp_image_new_from_drawable (Gimp *gimp,
if (GIMP_IS_LAYER (drawable))
{
- const guint8 *icc_data;
- gsize icc_len;
-
- icc_data = gimp_image_get_icc_profile (image, &icc_len);
- if (icc_data)
- gimp_image_set_icc_profile (new_image, icc_data, icc_len, NULL);
+ GimpColorProfile *profile = gimp_image_get_color_profile (image);
+ gimp_image_set_color_profile (new_image, profile, NULL);
new_type = G_TYPE_FROM_INSTANCE (drawable);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]