return((Image *) NULL);
if (expression == (const char *) NULL)
return(destination_image);
+ if (image->colorspace == UndefinedColorspace)
+ {
+ status=SetImageStorageClass(destination_image,DirectClass,exception);
+ if (status == MagickFalse)
+ {
+ destination_image=DestroyImageList(destination_image);
+ return(destination_image);
+ }
+ }
destination_channel=RedPixelChannel;
channel_mask=UndefinedChannel;
pixel=0.0;
}
}
destination_channel=(PixelChannel) i;
+ if (image->colorspace == UndefinedColorspace)
+ (void) SetPixelMetaChannels(destination_image,(size_t) (
+ destination_channel-GetPixelChannels(destination_image)+1),
+ exception);
switch (destination_channel)
{
case RedPixelChannel:
if (image->write_mask != MagickFalse)
SetPixelChannelAttributes(image,WriteMaskPixelChannel,CopyPixelTrait,n++);
assert((n+image->number_meta_channels) < MaxPixelChannels);
+ image->number_channels=(size_t) n;
trait=CopyPixelTrait;
if (image->colorspace == UndefinedColorspace)
trait=UpdatePixelTrait;
for (i=0; i < (ssize_t) image->number_meta_channels; i++)
SetPixelChannelAttributes(image,(PixelChannel) (MetaPixelChannel+i),trait,
n++);
- image->number_channels=(size_t) n;
if (image->debug != MagickFalse)
LogPixelChannels(image);
SetImageChannelMask(image,image->channel_mask);