% July 1992 %
% %
% %
-% Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
Image
*image;
- ssize_t
- y;
-
MagickBooleanType
status;
*p;
ssize_t
- count;
+ count,
+ y;
size_t
length;
image->columns=256;
image->rows=240;
image->depth=8;
- pixels=(unsigned char *) AcquireQuantumMemory(image->columns,
- 3*sizeof(*pixels));
+ pixels=(unsigned char *) AcquireQuantumMemory(image->columns,3*
+ sizeof(*pixels));
if (pixels == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
length=(size_t) (3*image->columns);
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- q->red=4*ScaleCharToQuantum(*p++);
- q->green=4*ScaleCharToQuantum(*p++);
- q->blue=4*ScaleCharToQuantum(*p++);
+ SetRedPixelComponent(q,4*ScaleCharToQuantum(*p++));
+ SetGreenPixelComponent(q,4*ScaleCharToQuantum(*p++));
+ SetBluePixelComponent(q,4*ScaleCharToQuantum(*p++));
SetOpacityPixelComponent(q,OpaqueOpacity);
q++;
}