From: cristy Date: Wed, 7 Apr 2010 19:44:01 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~9684 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=902d15bbdab48e089b0d0068fae916cce602fe08;p=imagemagick --- diff --git a/magick/profile.c b/magick/profile.c index 50b53c694..66d7560f7 100644 --- a/magick/profile.c +++ b/magick/profile.c @@ -87,6 +87,7 @@ #define cmsSigRgbData icSigRgbData #define cmsSigXYZData icSigXYZData #define cmsSigYCbCrData icSigYCbCrData +#define cmsSigLinkClass icSigLinkClass #endif #endif @@ -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); }