From 15e25cbb4f1dfbeac09c0ba8e78585b92d083dbe Mon Sep 17 00:00:00 2001 From: cristy Date: Sat, 13 Mar 2010 20:31:29 +0000 Subject: [PATCH] --- ChangeLog | 4 +++- coders/psd.c | 27 +++++++++------------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index f979dfb00..9d53622cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2010-03-13 6.6.0-6 Cristy + * Add support for the Adobe Large Document format. + 2010-03-11 6.6.0-5 Cristy * Permit user to get virtual pixels with a region width of 0. * Reformulate the jinc() functio so that the main peak is of amplitude of 1. @@ -6,7 +9,6 @@ 2010-03-07 6.6.0-4 Cristy * The -evaluate-sequence option behaves like -evaluate except it operates on a sequence of images. - * Add support for the Adobe Large Document format. 2010-03-05 6.6.0-2 Cristy * Add support for the -maximum and -minimum options. diff --git a/coders/psd.c b/coders/psd.c index d44e6dc22..8d2996506 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -1986,7 +1986,6 @@ static MagickBooleanType WritePSDImage(const ImageInfo *image_info,Image *image) *profile; MagickBooleanType - force_white_background = image->matte, invert_layer_count = MagickFalse, status; @@ -2013,7 +2012,7 @@ static MagickBooleanType WritePSDImage(const ImageInfo *image_info,Image *image) Image * tmp_image = (Image *) NULL, - * base_image = force_white_background ? image : GetNextImageInList(image); + * base_image = GetNextImageInList(image); /* Open output image file. @@ -2038,20 +2037,15 @@ static MagickBooleanType WritePSDImage(const ImageInfo *image_info,Image *image) (void) WriteBlobMSBShort(image,psd_info.version); /* version */ for (i=1; i <= 6; i++) (void) WriteBlobByte(image, 0); /* 6 bytes of reserved */ - if ( force_white_background ) - num_channels = 3; + if (image->storage_class == PseudoClass) + num_channels=(image->matte ? 2UL : 1UL); else - { - if (image->storage_class == PseudoClass) - num_channels=(image->matte ? 2UL : 1UL); - else { - if (image->colorspace != CMYKColorspace) - num_channels=(image->matte ? 4UL : 3UL); - else - num_channels=(image->matte ? 5UL : 4UL); + if (image->colorspace != CMYKColorspace) + num_channels=(image->matte ? 4UL : 3UL); + else + num_channels=(image->matte ? 5UL : 4UL); } - } (void) WriteBlobMSBShort(image,(unsigned short) num_channels); (void) WriteBlobMSBLong(image,image->rows); (void) WriteBlobMSBLong(image,image->columns); @@ -2264,11 +2258,8 @@ compute_layer_info: } - /* now the background image data! */ - if (force_white_background != MagickFalse) - WriteWhiteBackground(&psd_info,image); - else - status=WriteImageChannels(&psd_info,image_info,image,image,MagickFalse); + /* now the background image data! */ + status=WriteImageChannels(&psd_info,image_info,image,image,MagickFalse); (void) CloseBlob(image); return(status); -- 2.40.0