CINInfo
cin;
- const unsigned char
- *pixels;
-
Image
*image;
y;
unsigned char
- magick[4];
+ magick[4],
+ *pixels;
+
/*
Open image file.
quantum_type=GrayQuantum;
length=GetBytesPerRow(image->columns,1,image->depth,MagickTrue);
}
+ pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
+ const void
+ *stream;
+
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
if (q == (Quantum *) NULL)
break;
- pixels=(const unsigned char *) ReadBlobStream(image,length,
- GetQuantumPixels(quantum_info),&count);
+ stream=ReadBlobStream(image,length,pixels,&count);
if ((size_t) count != length)
break;
(void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
- quantum_type,pixels,exception);
+ quantum_type,stream,exception);
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
if (image->previous == (Image *) NULL)
return(DestroyImageList(image));
for (n=0; n < (ssize_t) dpx.image.number_elements; n++)
{
+ unsigned char
+ *pixels;
+
/*
Convert DPX raster image to pixel packets.
*/
SetQuantumQuantum(quantum_info,32);
SetQuantumPack(quantum_info,dpx.image.image_element[n].packing == 0 ?
MagickTrue : MagickFalse);
+ pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
- const unsigned char
- *pixels;
+ const void
+ *stream;
MagickBooleanType
sync;
ssize_t
offset;
- pixels=(const unsigned char *) ReadBlobStream(image,extent,
- GetQuantumPixels(quantum_info),&count);
+ stream=ReadBlobStream(image,extent,pixels,&count);
if (count != (ssize_t) extent)
break;
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
- quantum_type,pixels,exception);
+ quantum_type,stream,exception);
(void) length;
sync=SyncAuthenticPixels(image,exception);
if (sync == MagickFalse)
CommentInfo
comment_info;
+ const void
+ *stream;
+
double
quantum_scale;
row,
y;
+ unsigned char
+ *pixels;
+
/*
Open image file.
*/
ThrowPNMException(ResourceLimitError,"MemoryAllocationFailed");
SetQuantumMinIsWhite(quantum_info,MagickTrue);
extent=GetQuantumExtent(image,quantum_info,quantum_type);
+ pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
- const unsigned char
- *pixels;
-
MagickBooleanType
sync;
size_t
length;
- pixels=(unsigned char *) ReadBlobStream(image,extent,
- GetQuantumPixels(quantum_info),&count);
+ stream=ReadBlobStream(image,extent,pixels,&count);
if (count != (ssize_t) extent)
break;
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
- quantum_type,pixels,exception);
+ quantum_type,stream,exception);
if (length != extent)
break;
sync=SyncAuthenticPixels(image,exception);
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowPNMException(ResourceLimitError,"MemoryAllocationFailed");
+ pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
- const unsigned char
- *pixels;
-
MagickBooleanType
sync;
ssize_t
offset;
- pixels=(unsigned char *) ReadBlobStream(image,extent,
- GetQuantumPixels(quantum_info),&count);
+ stream=ReadBlobStream(image,extent,pixels,&count);
if (count != (ssize_t) extent)
break;
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (Quantum *) NULL)
break;
- p=pixels;
+ p=(unsigned char *) stream;
switch (image->depth)
{
case 8:
case 32:
{
(void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
- quantum_type,pixels,exception);
+ quantum_type,stream,exception);
break;
}
default:
if (quantum_info == (QuantumInfo *) NULL)
ThrowPNMException(ResourceLimitError,"MemoryAllocationFailed");
(void) SetQuantumEndian(image,quantum_info,MSBEndian);
+ pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
- const unsigned char
- *pixels;
-
MagickBooleanType
sync;
ssize_t
offset;
- pixels=(unsigned char *) ReadBlobStream(image,extent,
- GetQuantumPixels(quantum_info),&count);
+ stream=ReadBlobStream(image,extent,pixels,&count);
if (count != (ssize_t) extent)
break;
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (Quantum *) NULL)
break;
- p=pixels;
+ p=(unsigned char *) stream;
switch (image->depth)
{
case 8:
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowPNMException(ResourceLimitError,"MemoryAllocationFailed");
+ pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
- const unsigned char
- *pixels;
-
MagickBooleanType
sync;
ssize_t
offset;
- pixels=(unsigned char *) ReadBlobStream(image,extent,
- GetQuantumPixels(quantum_info),&count);
+ stream=ReadBlobStream(image,extent,pixels,&count);
if (count != (ssize_t) extent)
break;
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
q=QueueAuthenticPixels(image,0,offset,image->columns,1,exception);
if (q == (Quantum *) NULL)
break;
- p=pixels;
+ p=(unsigned char *) stream;
switch (image->depth)
{
case 8:
case 32:
{
(void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
- quantum_type,pixels,exception);
+ quantum_type,stream,exception);
break;
}
default:
ThrowPNMException(ResourceLimitError,"MemoryAllocationFailed");
SetQuantumScale(quantum_info,(double) QuantumRange*fabs(quantum_scale));
extent=GetQuantumExtent(image,quantum_info,quantum_type);
+ pixels=GetQuantumPixels(quantum_info);
for (y=0; y < (ssize_t) image->rows; y++)
{
- const unsigned char
- *pixels;
-
MagickBooleanType
sync;
size_t
length;
- pixels=(unsigned char *) ReadBlobStream(image,extent,
- GetQuantumPixels(quantum_info),&count);
+ stream=ReadBlobStream(image,extent,pixels,&count);
if (count != (ssize_t) extent)
break;
if ((image->progress_monitor != (MagickProgressMonitor) NULL) &&
if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(image,(CacheView *) NULL,quantum_info,
- quantum_type,pixels,exception);
+ quantum_type,stream,exception);
if (length != extent)
break;
sync=SyncAuthenticPixels(image,exception);