if ((image->storage_class == PseudoClass) &&
(image->colors > (size_t) (GetQuantumRange(image->depth)+1)))
(void) SetImageStorageClass(image,DirectClass,exception);
- if (IsImageGray(image,exception) != MagickFalse)
- (void) SetImageColorspace(image,GRAYColorspace,exception);
compression=image->compression;
if (image_info->compression != UndefinedCompression)
compression=image_info->compression;
/*
Convert image to a PBM image.
*/
- if (IsImageGray(image,exception) == MagickFalse)
- (void) TransformImageColorspace(image,GRAYColorspace,exception);
q=pixels;
for (y=0; y < (ssize_t) image->rows; y++)
{
/*
Convert image to a PGM image.
*/
- if (IsImageGray(image,exception) == MagickFalse)
- (void) TransformImageColorspace(image,GRAYColorspace,exception);
if (image->depth <= 8)
(void) WriteBlobString(image,"255\n");
else
/*
Convert image to a PBM image.
*/
- if (IsImageGray(image,exception) == MagickFalse)
- (void) TransformImageColorspace(image,GRAYColorspace,exception);
image->depth=1;
quantum_info=AcquireQuantumInfo((const ImageInfo *) NULL,image);
if (quantum_info == (QuantumInfo *) NULL)
/*
Convert image to a PGM image.
*/
- if (IsImageGray(image,exception) == MagickFalse)
- (void) TransformImageColorspace(image,GRAYColorspace,exception);
if (image->depth > 8)
image->depth=16;
(void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double)