+ else
+ if (image->depth <= 8)
+ {
+ unsigned char
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
+ {
+ p=PushCharPixel(p,&pixel);
+ q->red=ScaleAnyToQuantum(pixel,range);
+ p=PushCharPixel(p,&pixel);
+ q->green=ScaleAnyToQuantum(pixel,range);
+ p=PushCharPixel(p,&pixel);
+ q->blue=ScaleAnyToQuantum(pixel,range);
+ q->opacity=OpaqueOpacity;
+ q++;
+ }
+ }
+ else
+ {
+ unsigned short
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
+ {
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ q->red=ScaleAnyToQuantum(pixel,range);
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ q->green=ScaleAnyToQuantum(pixel,range);
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ q->blue=ScaleAnyToQuantum(pixel,range);
+ q->opacity=OpaqueOpacity;
+ q++;
+ }
+ }