[gimp/gimp-attributes-wip] app: fix setting color profile to image after convert While loading an image with color profile, gim
- From: Hartmut Kuhse <hartmutkuhse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-attributes-wip] app: fix setting color profile to image after convert While loading an image with color profile, gim
- Date: Sun, 6 Sep 2015 09:35:24 +0000 (UTC)
commit 705643debaaf8e8be243887d998ad5a9a048637d
Author: Hartmut Kuhse <hk_priv gmx de>
Date: Sun Sep 6 11:35:12 2015 +0200
app: fix setting color profile to image after convert
While loading an image with color profile, gimp offers the possibility
to convert it to the builtin profile. Setting the new color profile
before converting, deletes the old one and results in a segmentation fault.
app/core/gimpimage-color-profile.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpimage-color-profile.c b/app/core/gimpimage-color-profile.c
index 2119880..84dca22 100644
--- a/app/core/gimpimage-color-profile.c
+++ b/app/core/gimpimage-color-profile.c
@@ -370,10 +370,6 @@ gimp_image_convert_color_profile (GimpImage *image,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_CONVERT,
_("Color profile conversion"));
- gimp_image_set_color_profile (image, dest_profile, NULL);
- /* omg... */
- gimp_image_parasite_detach (image, "icc-profile-name");
-
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB:
@@ -394,6 +390,10 @@ gimp_image_convert_color_profile (GimpImage *image,
break;
}
+ gimp_image_set_color_profile (image, dest_profile, NULL);
+ /* omg... */
+ gimp_image_parasite_detach (image, "icc-profile-name");
+
gimp_image_undo_group_end (image);
if (progress)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]