const ImageInfo *image_info,Image *image,Image *next_image,
const MagickBooleanType separate,ExceptionInfo *exception)
{
- int
- i;
-
size_t
channels,
packet_size;
if (compact_pixels == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
- i=0;
if (IsImageGray(next_image,exception) != MagickFalse)
{
if (next_image->compression == RLECompression)
compact_pixels,AlphaQuantum,exception);
}
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- GrayQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ GrayQuantum,MagickTrue,exception);
if (next_image->alpha_trait != UndefinedPixelTrait)
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- AlphaQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ AlphaQuantum,separate,exception);
(void) SetImageProgress(image,SaveImagesTag,0,1);
}
else
compact_pixels,AlphaQuantum,exception);
}
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- IndexQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ IndexQuantum,MagickTrue,exception);
if (next_image->alpha_trait != UndefinedPixelTrait)
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- AlphaQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ AlphaQuantum,separate,exception);
(void) SetImageProgress(image,SaveImagesTag,0,1);
}
else
}
(void) SetImageProgress(image,SaveImagesTag,0,6);
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- RedQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ RedQuantum,MagickTrue,exception);
(void) SetImageProgress(image,SaveImagesTag,1,6);
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- GreenQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ GreenQuantum,separate,exception);
(void) SetImageProgress(image,SaveImagesTag,2,6);
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- BlueQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ BlueQuantum,separate,exception);
(void) SetImageProgress(image,SaveImagesTag,3,6);
if (next_image->colorspace == CMYKColorspace)
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- BlackQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ BlackQuantum,separate,exception);
(void) SetImageProgress(image,SaveImagesTag,4,6);
if (next_image->alpha_trait != UndefinedPixelTrait)
WriteOneChannel(psd_info,image_info,image,next_image,compact_pixels,
- AlphaQuantum,(i++ == 0) || (separate != MagickFalse) ? MagickTrue :
- MagickFalse,exception);
+ AlphaQuantum,separate,exception);
(void) SetImageProgress(image,SaveImagesTag,5,6);
if (next_image->colorspace == CMYKColorspace)
(void) NegateCMYK(next_image,exception);