count=0;
length=0;
scene=0;
+ status=MagickTrue;
do
{
/*
break;
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
- return(DestroyImageList(image));
+ break;
switch (image_info->interlace)
{
case NoInterlace:
length=GetQuantumExtent(canvas_image,quantum_info,quantum_type);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
break;
}
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("B",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
+ break;
+ if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
{
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+ image->filename);
+ break;
}
- if (DiscardBlobBytes(image,image->offset) == MagickFalse)
- ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
- image->filename);
length=GetQuantumExtent(canvas_image,quantum_info,BlueQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("G",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,GreenQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("R",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("A",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,AlphaQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
break;
}
}
+ if (status == MagickFalse)
+ break;
SetQuantumImageType(image,quantum_type);
/*
Proceed to next image.
quantum_info=DestroyQuantumInfo(quantum_info);
canvas_image=DestroyImage(canvas_image);
(void) CloseBlob(image);
+ if (status == MagickFalse)
+ return(DestroyImageList(image));
return(GetFirstImageInList(image));
}
\f
exception);
quantum_info=AcquireQuantumInfo(image_info,canvas_image);
if (quantum_info == (QuantumInfo *) NULL)
- ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ {
+ canvas_image=DestroyImage(canvas_image);
+ ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ }
quantum_type=CMYKQuantum;
if (LocaleCompare(image_info->magick,"CMYKA") == 0)
{
length=GetQuantumExtent(canvas_image,quantum_info,quantum_type);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
break;
}
length=GetQuantumExtent(canvas_image,quantum_info,CyanQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const Quantum
- *magick_restrict p;
+ for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 5 : 4); i++)
+ {
+ register const Quantum
+ *magick_restrict p;
- register Quantum
- *magick_restrict q;
+ register Quantum
+ *magick_restrict q;
- register ssize_t
- x;
+ register ssize_t
+ x;
- if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 5 : 4); i++)
- {
+ if (count != (ssize_t) length)
+ {
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,
+ "UnexpectedEndOfFile",image->filename);
+ break;
+ }
quantum_type=quantum_types[i];
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
length=GetQuantumExtent(canvas_image,quantum_info,CyanQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("C",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
+ break;
+ if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
{
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+ image->filename);
+ break;
}
- if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
- ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
- image->filename);
length=GetQuantumExtent(canvas_image,quantum_info,CyanQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("M",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,MagentaQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("Y",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,YellowQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("K",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,BlackQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("A",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,AlphaQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
break;
}
}
+ if (status == MagickFalse)
+ break;
SetQuantumImageType(image,quantum_type);
/*
Proceed to next image.
exception);
quantum_info=AcquireQuantumInfo(image_info,canvas_image);
if (quantum_info == (QuantumInfo *) NULL)
- ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ {
+ canvas_image=DestroyImage(canvas_image);
+ ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ }
quantum_type=GrayQuantum;
if (LocaleCompare(image_info->magick,"GRAYA") == 0)
{
count=0;
length=0;
scene=0;
+ status=MagickTrue;
do
{
/*
break;
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
- return(DestroyImageList(image));
+ break;
switch (image_info->interlace)
{
case NoInterlace:
length=GetQuantumExtent(canvas_image,quantum_info,quantum_type);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
break;
}
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const Quantum
- *magick_restrict p;
+ for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 4 : 3); i++)
+ {
+ register const Quantum
+ *magick_restrict p;
- register Quantum
- *magick_restrict q;
+ register Quantum
+ *magick_restrict q;
- register ssize_t
- x;
+ register ssize_t
+ x;
- if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 4 : 3); i++)
- {
+ if (count != (ssize_t) length)
+ {
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,
+ "UnexpectedEndOfFile",image->filename);
+ break;
+ }
quantum_type=quantum_types[i];
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
/*
Partition interlacing: G..., G..., G...
*/
- AppendImageFormat("R",image->filename);
+ AppendImageFormat("G",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
+ break;
+ if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
{
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+ image->filename);
+ break;
}
- if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
- ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
- image->filename);
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
break;
}
(void) CloseBlob(image);
- AppendImageFormat("G",image->filename);
- status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
- if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
- length=GetQuantumExtent(canvas_image,quantum_info,GreenQuantum);
- for (i=0; i < (ssize_t) scene; i++)
- for (y=0; y < (ssize_t) image->extract_info.height; y++)
- {
- pixels=(const unsigned char *) ReadBlobStream(image,length,
- GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- }
- pixels=(const unsigned char *) ReadBlobStream(image,length,
- GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
- for (y=0; y < (ssize_t) image->extract_info.height; y++)
- {
- register const Quantum
- *magick_restrict p;
-
- register Quantum
- *magick_restrict q;
-
- register ssize_t
- x;
-
- if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
- exception);
- if (q == (Quantum *) NULL)
- break;
- length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
- quantum_info,GreenQuantum,pixels,exception);
- if (SyncAuthenticPixels(canvas_image,exception) == MagickFalse)
- break;
- if (((y-image->extract_info.y) >= 0) &&
- ((y-image->extract_info.y) < (ssize_t) image->rows))
- {
- p=GetVirtualPixels(canvas_image,canvas_image->extract_info.x,0,
- canvas_image->columns,1,exception);
- q=GetAuthenticPixels(image,0,y-image->extract_info.y,
- image->columns,1,exception);
- if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
- break;
- for (x=0; x < (ssize_t) image->columns; x++)
- {
- SetPixelGreen(image,GetPixelGreen(canvas_image,p),q);
- p+=GetPixelChannels(canvas_image);
- q+=GetPixelChannels(image);
- }
- if (SyncAuthenticPixels(image,exception) == MagickFalse)
- break;
- }
- pixels=(const unsigned char *) ReadBlobStream(image,length,
- GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
- }
- if (image->previous == (Image *) NULL)
- {
- status=SetImageProgress(image,LoadImageTag,2,5);
- if (status == MagickFalse)
- break;
- }
- (void) CloseBlob(image);
- AppendImageFormat("B",image->filename);
- status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
- if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
- length=GetQuantumExtent(canvas_image,quantum_info,BlueQuantum);
- for (i=0; i < (ssize_t) scene; i++)
- for (y=0; y < (ssize_t) image->extract_info.height; y++)
- {
- pixels=(const unsigned char *) ReadBlobStream(image,length,
- GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- }
- pixels=(const unsigned char *) ReadBlobStream(image,length,
- GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
- for (y=0; y < (ssize_t) image->extract_info.height; y++)
- {
- register const Quantum
- *magick_restrict p;
-
- register Quantum
- *magick_restrict q;
-
- register ssize_t
- x;
-
- if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
- exception);
- if (q == (Quantum *) NULL)
- break;
- length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
- quantum_info,BlueQuantum,pixels,exception);
- if (SyncAuthenticPixels(canvas_image,exception) == MagickFalse)
- break;
- if (((y-image->extract_info.y) >= 0) &&
- ((y-image->extract_info.y) < (ssize_t) image->rows))
- {
- p=GetVirtualPixels(canvas_image,canvas_image->extract_info.x,0,
- canvas_image->columns,1,exception);
- q=GetAuthenticPixels(image,0,y-image->extract_info.y,
- image->columns,1,exception);
- if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
- break;
- for (x=0; x < (ssize_t) image->columns; x++)
- {
- SetPixelBlue(image,GetPixelBlue(canvas_image,p),q);
- p+=GetPixelChannels(canvas_image);
- q+=GetPixelChannels(image);
- }
- if (SyncAuthenticPixels(image,exception) == MagickFalse)
- break;
- }
- pixels=(const unsigned char *) ReadBlobStream(image,length,
- GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
- }
- if (image->previous == (Image *) NULL)
- {
- status=SetImageProgress(image,LoadImageTag,3,5);
- if (status == MagickFalse)
- break;
- }
if (image->alpha_trait != UndefinedPixelTrait)
{
(void) CloseBlob(image);
AppendImageFormat("A",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,AlphaQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
break;
}
}
+ if (status == MagickFalse)
+ break;
SetQuantumImageType(image,quantum_type);
/*
Proceed to next image.
quantum_info=DestroyQuantumInfo(quantum_info);
canvas_image=DestroyImage(canvas_image);
(void) CloseBlob(image);
+ if (status == MagickFalse)
+ return(DestroyImageList(image));
return(GetFirstImageInList(image));
}
\f
exception);
quantum_info=AcquireQuantumInfo(image_info,canvas_image);
if (quantum_info == (QuantumInfo *) NULL)
- ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ {
+ canvas_image=DestroyImage(canvas_image);
+ ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ }
quantum_type=RGBQuantum;
if (LocaleCompare(image_info->magick,"RGBA") == 0)
{
count=0;
length=0;
scene=0;
+ status=MagickTrue;
do
{
/*
break;
status=SetImageExtent(image,image->columns,image->rows,exception);
if (status == MagickFalse)
- return(DestroyImageList(image));
+ break;
switch (image_info->interlace)
{
case NoInterlace:
length=GetQuantumExtent(canvas_image,quantum_info,quantum_type);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
break;
}
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const Quantum
- *magick_restrict p;
+ for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 4 : 3); i++)
+ {
+ register const Quantum
+ *magick_restrict p;
- register Quantum
- *magick_restrict q;
+ register Quantum
+ *magick_restrict q;
- register ssize_t
- x;
+ register ssize_t
+ x;
- if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 4 : 3); i++)
- {
+ if (count != (ssize_t) length)
+ {
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,
+ "UnexpectedEndOfFile",image->filename);
+ break;
+ }
quantum_type=quantum_types[i];
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("R",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
+ break;
+ if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
{
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+ image->filename);
+ break;
}
- if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
- ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
- image->filename);
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("G",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,GreenQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("B",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,BlueQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
- }
+ break;
+ }
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("A",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,AlphaQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
register const Quantum
if (count != (ssize_t) length)
{
+ status=MagickFalse;
ThrowFileException(exception,CorruptImageError,
"UnexpectedEndOfFile",image->filename);
break;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
break;
}
}
+ if (status == MagickFalse)
+ break;
SetQuantumImageType(image,quantum_type);
/*
Proceed to next image.
quantum_info=DestroyQuantumInfo(quantum_info);
canvas_image=DestroyImage(canvas_image);
(void) CloseBlob(image);
+ if (status == MagickFalse)
+ return(DestroyImageList(image));
return(GetFirstImageInList(image));
}
\f
QuantumType
quantum_type;
- register const Quantum
- *p;
-
register ssize_t
- i,
- x;
-
- register Quantum
- *q;
+ i;
size_t
length;
exception);
quantum_info=AcquireQuantumInfo(image_info,canvas_image);
if (quantum_info == (QuantumInfo *) NULL)
- ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ {
+ canvas_image=DestroyImage(canvas_image);
+ ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+ }
quantum_type=RGBQuantum;
if (LocaleCompare(image_info->magick,"YCbCrA") == 0)
{
length=GetQuantumExtent(canvas_image,quantum_info,quantum_type);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
break;
}
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
for (i=0; i < (ssize_t) (image->alpha_trait != UndefinedPixelTrait ? 4 : 3); i++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
{
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("Y",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
+ break;
+ if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
{
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
+ status=MagickFalse;
+ ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+ image->filename);
+ break;
}
- if (DiscardBlobBytes(image,(MagickSizeType) image->offset) == MagickFalse)
- ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
- image->filename);
length=GetQuantumExtent(canvas_image,quantum_info,RedQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("Cb",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,GreenQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("Cr",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,BlueQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
AppendImageFormat("A",image->filename);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
- {
- canvas_image=DestroyImageList(canvas_image);
- image=DestroyImageList(image);
- return((Image *) NULL);
- }
+ break;
length=GetQuantumExtent(canvas_image,quantum_info,AlphaQuantum);
for (i=0; i < (ssize_t) scene; i++)
+ {
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
if (count != (ssize_t) length)
- {
- status=MagickFalse;
- ThrowFileException(exception,CorruptImageError,
- "UnexpectedEndOfFile",image->filename);
- break;
- }
+ break;
}
+ if (count != (ssize_t) length)
+ break;
+ }
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
+ register const Quantum
+ *magick_restrict p;
+
+ register Quantum
+ *magick_restrict q;
+
+ register ssize_t
+ x;
+
if (count != (ssize_t) length)
{
status=MagickFalse;
}
pixels=(const unsigned char *) ReadBlobStream(image,length,
GetQuantumPixels(quantum_info),&count);
- if (count != (ssize_t) length)
- break;
}
if (image->previous == (Image *) NULL)
{
break;
}
}
+ if (status == MagickFalse)
+ break;
SetQuantumImageType(image,quantum_type);
/*
Proceed to next image.