[gimp] app: remove sanity checks on the content of the 'icc-profile' parasite



commit db9f7c195aa96614d0b8e3e33c847c78c3c1a63e
Author: Michael Natterer <mitch gimp org>
Date:   Sun Mar 23 21:19:06 2014 +0100

    app: remove sanity checks on the content of the 'icc-profile' parasite
    
    We now validate the parasite at attach time.

 app/core/gimpimage-profile.c |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/app/core/gimpimage-profile.c b/app/core/gimpimage-profile.c
index 32e274b..68abd7b 100644
--- a/app/core/gimpimage-profile.c
+++ b/app/core/gimpimage-profile.c
@@ -151,22 +151,9 @@ gimp_image_get_profile (GimpImage  *image,
 
   if (parasite)
     {
-      profile = gimp_lcms_profile_open_from_data (gimp_parasite_data (parasite),
-                                                  gimp_parasite_data_size (parasite),
-                                                  md5_digest, error);
-
-      if (! profile)
-        g_prefix_error (error,
-                        _("Error parsing data attached as 'icc-profile': "));
-
-      if (profile && ! gimp_lcms_profile_is_rgb (profile))
-        {
-          g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
-                               _("Color profile attached as 'icc-profile' is "
-                                 "not for RGB color space"));
-          cmsCloseProfile (profile);
-          profile = NULL;
-        }
+      return gimp_lcms_profile_open_from_data (gimp_parasite_data (parasite),
+                                               gimp_parasite_data_size (parasite),
+                                               md5_digest, error);
     }
   else if (config->rgb_profile)
     {


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