From: cristy Date: Sat, 17 Apr 2010 13:24:39 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~9627 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=416dbd5933171784acf1f262219d9fdc5bae2342;p=imagemagick --- diff --git a/coders/psd.c b/coders/psd.c index 7142b9642..2ccafcd82 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -2009,12 +2009,16 @@ static MagickBooleanType WritePSDImage(const ImageInfo *image_info,Image *image) Image resource block. */ length=28; /* 0x03EB */ - bim_profile=GetImageProfile(image,"8bim"); - if (bim_profile != (StringInfo *) NULL) - length+=GetStringInfoLength(bim_profile); + bim_profile=(StringInfo *) NULL; icc_profile=GetImageProfile(image,"icc"); if (icc_profile != (StringInfo *) NULL) length+=PSDQuantum(GetStringInfoLength(icc_profile))+12; + else + { + bim_profile=GetImageProfile(image,"8bim"); + if (bim_profile != (StringInfo *) NULL) + length+=GetStringInfoLength(bim_profile); + } (void) WriteBlobMSBLong(image,length); WriteResolutionResourceBlock(image); if (bim_profile != (StringInfo *) NULL)