[gimp] app: don't pass a NULL profile to gimp_image_convert_color_profile()



commit 8c2c22ccb4091f77b28b2d5eb8141064a5d55f76
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jul 4 12:28:42 2016 +0200

    app: don't pass a NULL profile to gimp_image_convert_color_profile()
    
    In gimp_image_import_color_profile(), when converting
    non-interactively, pass the image's built-in profile.

 app/core/gimpimage-color-profile.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpimage-color-profile.c b/app/core/gimpimage-color-profile.c
index 8a7138a..569f8e9 100644
--- a/app/core/gimpimage-color-profile.c
+++ b/app/core/gimpimage-color-profile.c
@@ -478,6 +478,12 @@ gimp_image_import_color_profile (GimpImage    *image,
 
       if (policy == GIMP_COLOR_PROFILE_POLICY_CONVERT)
         {
+          if (! dest_profile)
+            {
+              dest_profile = gimp_image_get_builtin_color_profile (image);
+              g_object_ref (dest_profile);
+            }
+
           gimp_image_convert_color_profile (image, dest_profile,
                                             intent, bpc,
                                             progress, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]