Index: ImageMagick-6.9.11-60/coders/png.c =================================================================== --- ImageMagick-6.9.11-60.orig/coders/png.c +++ ImageMagick-6.9.11-60/coders/png.c @@ -3792,7 +3792,6 @@ static Image *ReadOnePNGImage(MngInfo *m (void) FormatLocaleString(key,MaxTextExtent,"%s",text[i].key); if ((LocaleCompare(key,"version") == 0) || - (LocaleCompare(key,"profile") == 0) || (LocaleCompare(key,"width") == 0)) (void) FormatLocaleString(key,MagickPathExtent,"png:%s", text[i].key); Index: ImageMagick-6.9.11-60/magick/property.c =================================================================== --- ImageMagick-6.9.11-60.orig/magick/property.c +++ ImageMagick-6.9.11-60/magick/property.c @@ -4399,27 +4399,6 @@ MagickExport MagickBooleanType SetImageP geometry=DestroyString(geometry); break; } - if (LocaleCompare("profile",property) == 0) - { - ImageInfo - *image_info; - - StringInfo - *profile = (StringInfo *) NULL; - - image_info=AcquireImageInfo(); - (void) CopyMagickString(image_info->filename,value,MaxTextExtent); - (void) SetImageInfo(image_info,1,exception); - if (LocaleCompare(image_info->filename,"-") != 0) - profile=FileToStringInfo(image_info->filename,~0UL,exception); - if (profile != (StringInfo *) NULL) - { - status=SetImageProfile(image,image_info->magick,profile); - profile=DestroyStringInfo(profile); - } - image_info=DestroyImageInfo(image_info); - break; - } status=AddValueToSplayTree((SplayTreeInfo *) image->properties, ConstantString(property),ConstantString(value)); break; Index: ImageMagick-6.9.11-60/wand/mogrify.c =================================================================== --- ImageMagick-6.9.11-60.orig/wand/mogrify.c +++ ImageMagick-6.9.11-60/wand/mogrify.c @@ -2840,7 +2840,26 @@ WandExport MagickBooleanType MogrifyImag (void) SetImageArtifact(*image,argv[i+1]+7,value); } else - (void) SetImageProperty(*image,argv[i+1],value); + if (LocaleCompare(argv[i+1],"profile") == 0) + { + StringInfo + *profile = (StringInfo *) NULL; + + (void) CopyMagickString(image_info->filename,value, + MaxTextExtent); + (void) SetImageInfo(image_info,1,exception); + if (LocaleCompare(image_info->filename,"-") != 0) + profile=FileToStringInfo(image_info->filename,~0UL, + exception); + if (profile != (StringInfo *) NULL) + { + status=SetImageProfile(*image,image_info->magick, + profile); + profile=DestroyStringInfo(profile); + } + } + else + (void) SetImageProperty(*image,argv[i+1],value); value=DestroyString(value); break; }