]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 7 Apr 2010 19:44:01 +0000 (19:44 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 7 Apr 2010 19:44:01 +0000 (19:44 +0000)
magick/profile.c

index 50b53c6948938f3241bcb70a6695e07dbefe3571..66d7560f79da190f8b4a02eb182eba42e161e9aa 100644 (file)
@@ -87,6 +87,7 @@
 #define cmsSigRgbData icSigRgbData
 #define cmsSigXYZData icSigXYZData
 #define cmsSigYCbCrData icSigYCbCrData
+#define cmsSigLinkClass icSigLinkClass
 #endif
 #endif
 \f
@@ -893,9 +894,12 @@ MagickExport MagickBooleanType ProfileImage(Image *image,const char *name,
   /*
     Add a ICC, IPTC, or generic profile to the image.
   */
+  status=MagickTrue;
   profile=AcquireStringInfo((size_t) length);
   SetStringInfoDatum(profile,(unsigned char *) datum);
-  if ((LocaleCompare(name,"icc") == 0) || (LocaleCompare(name,"icm") == 0))
+  if ((LocaleCompare(name,"icc") != 0) && (LocaleCompare(name,"icm") != 0))
+    status=SetImageProfile(image,name,profile);
+  else
     {
       const StringInfo
         *icc_profile;
@@ -1324,9 +1328,10 @@ MagickExport MagickBooleanType ProfileImage(Image *image,const char *name,
           transform=DestroyTransformThreadSet(transform);
           (void) cmsCloseProfile(target_profile);
         }
+      if (cmsGetDeviceClass(profile) != cmsSigLinkClass)
+        status=SetImageProfile(image,name,profile);
 #endif
     }
-  status=SetImageProfile(image,name,profile);
   profile=DestroyStringInfo(profile);
   return(status);
 }