*magick_restrict q;
ssize_t
- count,
offset;
size_t
*magick_restrict q;
ssize_t
- count,
offset;
pixels=(unsigned char *) ReadBlobStream(image,extent,
}
default:
{
- unsigned int
- pixel;
-
if (image->depth <= 8)
{
unsigned char
SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
q+=GetPixelChannels(image);
}
- break;
}
- if (image->depth <= 16)
+ else if (image->depth <= 16)
{
unsigned short
pixel;
SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
q+=GetPixelChannels(image);
}
- break;
}
- for (x=0; x < (ssize_t) image->columns; x++)
- {
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
- q+=GetPixelChannels(image);
- }
+ else
+ {
+ unsigned int
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
+ {
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
+ q+=GetPixelChannels(image);
+ }
+ }
break;
}
}
*magick_restrict q;
ssize_t
- count,
offset;
pixels=(unsigned char *) ReadBlobStream(image,extent,
}
default:
{
- unsigned int
- pixel;
-
if (image->depth <= 8)
{
unsigned char
SetPixelAlpha(image,OpaqueAlpha,q);
q+=GetPixelChannels(image);
}
- break;
}
- if (image->depth <= 16)
+ else if (image->depth <= 16)
{
unsigned short
pixel;
SetPixelAlpha(image,OpaqueAlpha,q);
q+=GetPixelChannels(image);
}
- break;
}
- for (x=0; x < (ssize_t) image->columns; x++)
- {
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),q);
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),q);
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),q);
- SetPixelAlpha(image,OpaqueAlpha,q);
- q+=GetPixelChannels(image);
- }
+ else
+ {
+ unsigned int
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
+ {
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),q);
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),q);
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ q+=GetPixelChannels(image);
+ }
+ }
break;
}
}
*magick_restrict q;
ssize_t
- count,
offset;
pixels=(unsigned char *) ReadBlobStream(image,extent,
case GrayQuantum:
case GrayAlphaQuantum:
{
- unsigned int
- pixel;
-
if (image->depth <= 8)
{
unsigned char
}
q+=GetPixelChannels(image);
}
- break;
}
- if (image->depth <= 16)
+ else if (image->depth <= 16)
{
unsigned short
pixel;
}
q+=GetPixelChannels(image);
}
- break;
}
- for (x=0; x < (ssize_t) image->columns; x++)
- {
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),q);
- SetPixelAlpha(image,OpaqueAlpha,q);
- if (image->alpha_trait != UndefinedPixelTrait)
+ else
+ {
+ unsigned int
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelAlpha(image,ScaleAnyToQuantum(pixel,max_value),
+ SetPixelGray(image,ScaleAnyToQuantum(pixel,max_value),
q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ if (image->alpha_trait != UndefinedPixelTrait)
+ {
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelAlpha(image,ScaleAnyToQuantum(pixel,
+ max_value),q);
+ }
+ q+=GetPixelChannels(image);
}
- q+=GetPixelChannels(image);
- }
+ }
break;
}
case CMYKQuantum:
case CMYKAQuantum:
{
- unsigned int
- pixel;
-
if (image->depth <= 8)
{
unsigned char
}
q+=GetPixelChannels(image);
}
- break;
}
- if (image->depth <= 16)
+ else if (image->depth <= 16)
{
unsigned short
pixel;
}
q+=GetPixelChannels(image);
}
- break;
}
- for (x=0; x < (ssize_t) image->columns; x++)
- {
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),q);
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),q);
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),q);
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelBlack(image,ScaleAnyToQuantum(pixel,max_value),q);
- SetPixelAlpha(image,OpaqueAlpha,q);
- if (image->alpha_trait != UndefinedPixelTrait)
+ else
+ {
+ unsigned int
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelAlpha(image,ScaleAnyToQuantum(pixel,max_value),
+ SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),
q);
- }
- q+=GetPixelChannels(image);
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelBlack(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ if (image->alpha_trait != UndefinedPixelTrait)
+ {
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelAlpha(image,ScaleAnyToQuantum(pixel,
+ max_value),q);
+ }
+ q+=GetPixelChannels(image);
+ }
}
break;
}
default:
{
- unsigned int
- pixel;
-
if (image->depth <= 8)
{
unsigned char
}
q+=GetPixelChannels(image);
}
- break;
}
- if (image->depth <= 16)
+ else if (image->depth <= 16)
{
unsigned short
pixel;
}
q+=GetPixelChannels(image);
}
- break;
}
- for (x=0; x < (ssize_t) image->columns; x++)
- {
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),q);
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),q);
- p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),q);
- SetPixelAlpha(image,OpaqueAlpha,q);
- if (image->alpha_trait != UndefinedPixelTrait)
+ else
+ {
+ unsigned int
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
{
p=PushLongPixel(MSBEndian,p,&pixel);
- SetPixelAlpha(image,ScaleAnyToQuantum(pixel,max_value),
+ SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),
q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ if (image->alpha_trait != UndefinedPixelTrait)
+ {
+ p=PushLongPixel(MSBEndian,p,&pixel);
+ SetPixelAlpha(image,ScaleAnyToQuantum(pixel,
+ max_value),q);
+ }
+ q+=GetPixelChannels(image);
}
- q+=GetPixelChannels(image);
- }
+ }
break;
}
}
*magick_restrict q;
ssize_t
- count,
offset;
size_t
quantum_type;
register unsigned char
- *pixels,
*q;
size_t
}
case '4':
{
+ register unsigned char
+ *pixels;
+
/*
Convert image to a PBM image.
*/
}
case '5':
{
+ register unsigned char
+ *pixels;
+
/*
Convert image to a PGM image.
*/
}
case '6':
{
+ register unsigned char
+ *pixels;
+
/*
Convert image to a PNM image.
*/
}
case '7':
{
+ register unsigned char
+ *pixels;
+
/*
Convert image to a PAM.
*/
case 'F':
case 'f':
{
+ register unsigned char
+ *pixels;
+
(void) WriteBlobString(image,image->endian == LSBEndian ? "-1.0\n" :
"1.0\n");
image->depth=32;