channel_statistics[GrayPixelChannel].depth);
break;
}
- default:
+ default:
{
ssize_t
number_channels;
scale,channel_statistics);
break;
}
- default:
+ default:
{
ssize_t
number_channels;
(void) FormatLocaleString(channel,MagickPathExtent,"Channel %.20g",
(double) i);
- (void) PrintChannelStatistics(file,GrayPixelChannel,channel,1.0/
+ (void) PrintChannelStatistics(file,(PixelChannel) i,channel,1.0/
scale,channel_statistics);
}
break;
channel_moments);
break;
}
- default:
+ default:
{
ssize_t
number_channels;
(void) FormatLocaleString(channel,MagickPathExtent,"Channel %.20g",
(double) i);
- (void) PrintChannelMoments(file,GrayPixelChannel,"channel",scale,
+ (void) PrintChannelMoments(file,(PixelChannel) i,"channel",scale,
channel_moments);
}
break;
channel_features);
break;
}
- default:
+ default:
{
ssize_t
number_channels;
(void) FormatLocaleString(channel,MagickPathExtent,"Channel %.20g",
(double) i);
- (void) PrintChannelFeatures(file,GrayPixelChannel,channel,
+ (void) PrintChannelFeatures(file,(PixelChannel) i,channel,
channel_features);
}
break;
assert(image->signature == MagickCoreSignature);
(void) ResetMagickMemory(image->channel_map,0,MaxPixelChannels*
sizeof(*image->channel_map));
+ n=0;
+ if (image->colorspace == UndefinedColorspace)
+ {
+ /*
+ Multispectral image.
+ */
+ for (i=0; i < (ssize_t) image->number_channels; i++)
+ SetPixelChannelAttributes(image,(PixelChannel) i,UpdatePixelTrait,n++);
+ for (i=0; i < (ssize_t) image->number_meta_channels; i++)
+ SetPixelChannelAttributes(image,(PixelChannel) (image->number_channels+
+ i),UpdatePixelTrait,n++);
+ if (image->debug != MagickFalse)
+ LogPixelChannels(image);
+ SetImageChannelMask(image,image->channel_mask);
+ return;
+ }
trait=UpdatePixelTrait;
if (image->alpha_trait != UndefinedPixelTrait)
trait=(PixelTrait) (trait | BlendPixelTrait);
- n=0;
- if ((image->colorspace == GRAYColorspace) ||
- (image->colorspace == UndefinedColorspace))
+ if (image->colorspace == GRAYColorspace)
{
SetPixelChannelAttributes(image,BluePixelChannel,trait,n);
SetPixelChannelAttributes(image,GreenPixelChannel,trait,n);
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++);
+ SetPixelChannelAttributes(image,(PixelChannel) (MetaPixelChannel+i),
+ CopyPixelTrait,n++);
if (image->debug != MagickFalse)
LogPixelChannels(image);
SetImageChannelMask(image,image->channel_mask);