if (compact_pixels == (unsigned char *) NULL)
ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
image->filename);
- (void) ResetMagickMemory(compact_pixels,0,length*
- sizeof(*compact_pixels));
+ (void) ResetMagickMemory(compact_pixels,0,length*sizeof(*compact_pixels));
}
for (y=0; y < (long) image->rows; y++)
{
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" ImageColorMap allocated");
+ image->colorspace=GRAYColorspace;
}
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
if (layer_info[i].visible == MagickFalse)
layer_info[i].image->compose=NoCompositeOp;
if (psd_info.mode == CMYKMode)
- image->colorspace=CMYKColorspace;
+ layer_info[i].image->colorspace=CMYKColorspace;
+ if ((psd_info.mode == BitmapMode) ||
+ (psd_info.mode == GrayscaleMode) ||
+ (psd_info.mode == DuotoneMode))
+ layer_info[i].image->colorspace=GRAYColorspace;
for (j=0; j < (long) layer_info[i].channels; j++)
if (layer_info[i].channel_info[j].type == -1)
layer_info[i].image->matte=MagickTrue;
*/
image->taint=MagickTrue;
image->type=UndefinedType;
- if (image->colorspace == GRAYColorspace)
- image->colorspace=RGBColorspace;
if (ValidatePixelCacheMorphology(image) == MagickFalse)
status=OpenPixelCache(image,IOMode,exception);
}
int
status;
- if (channel == AlphaChannel)
- {
- status=fprintf(file,StatisticsFormat,name,ClampToQuantum(scale*
- (QuantumRange-channel_statistics[channel].minima)),
- (QuantumRange-channel_statistics[channel].minima)/(double) QuantumRange,
- ClampToQuantum(scale*(QuantumRange-channel_statistics[channel].maxima)),
- (QuantumRange-channel_statistics[channel].maxima)/(double) QuantumRange, scale*(QuantumRange-channel_statistics[channel].mean),
- (QuantumRange-channel_statistics[channel].mean)/(double) QuantumRange,
- scale*channel_statistics[channel].standard_deviation,
- channel_statistics[channel].standard_deviation/(double) QuantumRange,
- channel_statistics[channel].kurtosis,
- channel_statistics[channel].skewness);
- return(status);
- }
status=fprintf(file,StatisticsFormat,name,ClampToQuantum(scale*
channel_statistics[channel].minima),channel_statistics[channel].minima/
(double) QuantumRange,ClampToQuantum(scale*