static QuantumType
quantum_types[4] =
{
- RedQuantum,
- GreenQuantum,
- BlueQuantum,
+ GrayQuantum,
AlphaQuantum
};
/*
- Line interlacing: RRR...GGG...BBB...RRR...GGG...BBB...
+ Line interlacing: GGG...
*/
- if (LocaleCompare(image_info->magick,"GRAYO") == 0)
- quantum_types[3]=OpacityQuantum;
if (scene == 0)
{
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
{
switch (quantum_type)
{
- case RedQuantum:
- {
- SetPixelRed(image,GetPixelRed(canvas_image,p),q);
- break;
- }
- case GreenQuantum:
- {
- SetPixelGreen(image,GetPixelGreen(canvas_image,p),q);
- break;
- }
- case BlueQuantum:
+ case GrayQuantum:
{
- SetPixelBlue(image,GetPixelBlue(canvas_image,p),q);
- break;
- }
- case OpacityQuantum:
- {
- SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q);
+ SetPixelGray(image,GetPixelRed(canvas_image,p),q);
break;
}
case AlphaQuantum:
case PlaneInterlace:
{
/*
- Plane interlacing: RRRRRR...GGGGGG...BBBBBB...
+ Plane interlacing: GGG...
*/
if (scene == 0)
{
case PartitionInterlace:
{
/*
- Partition interlacing: RRRRRR..., GGGGGG..., BBBBBB...
+ Partition interlacing: GGG...
*/
AppendImageFormat("R",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);