- p=PushShortPixel(MSBEndian,p,&pixel);
- SetPixelRed(image,ScaleAnyToQuantum(pixel,range),q);
- p=PushShortPixel(MSBEndian,p,&pixel);
- SetPixelGreen(image,ScaleAnyToQuantum(pixel,range),q);
- p=PushShortPixel(MSBEndian,p,&pixel);
- SetPixelBlue(image,ScaleAnyToQuantum(pixel,range),q);
- p=PushShortPixel(MSBEndian,p,&pixel);
- SetPixelBlack(image,ScaleAnyToQuantum(pixel,range),q);
- SetPixelAlpha(image,OpaqueAlpha,q);
- if (image->matte != MagickFalse)
- {
- p=PushShortPixel(MSBEndian,p,&pixel);
- SetPixelAlpha(image,ScaleAnyToQuantum(pixel,range),q);
- }
- q+=GetPixelChannels(image);
+ unsigned short
+ pixel;
+
+ for (x=0; x < (ssize_t) image->columns; x++)
+ {
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelRed(image,ScaleAnyToQuantum(pixel,max_value),q);
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelGreen(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelBlue(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelBlack(image,ScaleAnyToQuantum(pixel,max_value),
+ q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ if (image->alpha_trait != UndefinedPixelTrait)
+ {
+ p=PushShortPixel(MSBEndian,p,&pixel);
+ SetPixelAlpha(image,ScaleAnyToQuantum(pixel,
+ max_value),q);
+ }
+ q+=GetPixelChannels(image);
+ }