channels=1;
if (separate == MagickFalse)
{
- if (IsImageGray(next_image) == MagickFalse)
- channels=next_image->colorspace == CMYKColorspace ? 4 : 3;
- if (next_image->alpha_trait != UndefinedPixelTrait)
- channels++;
+ if (image->storage_class != PseudoClass)
+ {
+ if (IsImageGray(next_image) == MagickFalse)
+ channels=next_image->colorspace == CMYKColorspace ? 4 : 3;
+ if (next_image->alpha_trait != UndefinedPixelTrait)
+ channels++;
+ }
rows_offset=TellBlob(image)+2;
count+=WriteCompressionStart(psd_info,image,next_image,channels);
offset_length=(next_image->rows*(psd_info->version == 1 ? 2 : 4));