% July 1992 %
% %
% %
-% Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2013 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 %
/*
Include declarations.
*/
-#include "magick/studio.h"
-#include "magick/blob.h"
-#include "magick/blob-private.h"
-#include "magick/cache.h"
-#include "magick/colorspace.h"
-#include "magick/constitute.h"
-#include "magick/exception.h"
-#include "magick/exception-private.h"
-#include "magick/image.h"
-#include "magick/image-private.h"
-#include "magick/list.h"
-#include "magick/magick.h"
-#include "magick/memory_.h"
-#include "magick/monitor.h"
-#include "magick/monitor-private.h"
-#include "magick/pixel-private.h"
-#include "magick/quantum-private.h"
-#include "magick/static.h"
-#include "magick/statistic.h"
-#include "magick/string_.h"
-#include "magick/module.h"
-#include "magick/utility.h"
+#include "MagickCore/studio.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/cache.h"
+#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
+#include "MagickCore/constitute.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/exception-private.h"
+#include "MagickCore/image.h"
+#include "MagickCore/image-private.h"
+#include "MagickCore/list.h"
+#include "MagickCore/magick.h"
+#include "MagickCore/memory_.h"
+#include "MagickCore/monitor.h"
+#include "MagickCore/monitor-private.h"
+#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/quantum-private.h"
+#include "MagickCore/static.h"
+#include "MagickCore/statistic.h"
+#include "MagickCore/string_.h"
+#include "MagickCore/module.h"
+#include "MagickCore/utility.h"
\f
/*
Forward declarations.
*/
static MagickBooleanType
- WriteRGBImage(const ImageInfo *,Image *);
+ WriteRGBImage(const ImageInfo *,Image *,ExceptionInfo *);
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% o exception: return any errors or warnings in this structure.
%
*/
-static Image *ReadRGBImage(const ImageInfo *image_info,
- ExceptionInfo *exception)
+static Image *ReadRGBImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
*canvas_image,
image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
- image=AcquireImage(image_info);
+ image=AcquireImage(image_info,exception);
if ((image->columns == 0) || (image->rows == 0))
ThrowReaderException(OptionError,"MustSpecifyImageSize");
- image->colorspace=RGBColorspace;
if (image_info->interlace != PartitionInterlace)
{
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
*/
canvas_image=CloneImage(image,image->extract_info.width,1,MagickFalse,
exception);
- (void) SetImageVirtualPixelMethod(canvas_image,BlackVirtualPixelMethod);
+ (void) SetImageVirtualPixelMethod(canvas_image,BlackVirtualPixelMethod,
+ exception);
quantum_info=AcquireQuantumInfo(image_info,canvas_image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
if (LocaleCompare(image_info->magick,"RGBA") == 0)
{
quantum_type=RGBAQuantum;
- image->matte=MagickTrue;
+ image->alpha_trait=BlendPixelTrait;
+ canvas_image->alpha_trait=BlendPixelTrait;
}
if (LocaleCompare(image_info->magick,"RGBO") == 0)
{
quantum_type=RGBOQuantum;
- image->matte=MagickTrue;
+ canvas_image->alpha_trait=BlendPixelTrait;
}
if (image_info->number_scenes != 0)
while (image->scene < image_info->scene)
if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))
if (image->scene >= (image_info->scene+image_info->number_scenes-1))
break;
- image->colorspace=RGBColorspace;
switch (image_info->interlace)
{
case NoInterlace:
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,quantum_type,pixels,exception);
canvas_image->columns,1,exception);
q=QueueAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelRed(q,GetPixelRed(p));
- SetPixelGreen(q,GetPixelGreen(p));
- SetPixelBlue(q,GetPixelBlue(p));
- SetPixelOpacity(q,OpaqueOpacity);
- if (image->matte != MagickFalse)
- SetPixelOpacity(q,GetPixelOpacity(p));
- p++;
- q++;
+ SetPixelRed(image,GetPixelRed(canvas_image,p),q);
+ SetPixelGreen(image,GetPixelGreen(canvas_image,p),q);
+ SetPixelBlue(image,GetPixelBlue(canvas_image,p),q);
+ SetPixelAlpha(image,OpaqueAlpha,q);
+ if (image->alpha_trait == BlendPixelTrait)
+ SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
"UnexpectedEndOfFile",image->filename);
break;
}
- for (i=0; i < (ssize_t) (image->matte != MagickFalse ? 4 : 3); i++)
+ for (i=0; i < (ssize_t) (image->alpha_trait == BlendPixelTrait ? 4 : 3); i++)
{
quantum_type=quantum_types[i];
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,quantum_type,pixels,exception);
0,canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
{
case RedQuantum:
{
- SetPixelRed(q,GetPixelRed(p));
+ SetPixelRed(image,GetPixelRed(canvas_image,p),q);
break;
}
case GreenQuantum:
{
- SetPixelGreen(q,GetPixelGreen(p));
+ SetPixelGreen(image,GetPixelGreen(canvas_image,p),q);
break;
}
case BlueQuantum:
{
- SetPixelBlue(q,GetPixelBlue(p));
+ SetPixelBlue(image,GetPixelBlue(canvas_image,p),q);
break;
}
case OpacityQuantum:
{
- SetPixelOpacity(q,GetPixelOpacity(p));
+ SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q);
break;
}
case AlphaQuantum:
{
- SetPixelAlpha(q,GetPixelAlpha(p));
+ SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q);
break;
}
default:
break;
}
- p++;
- q++;
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,RedQuantum,pixels,exception);
canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelRed(q,GetPixelRed(p));
- p++;
- q++;
+ SetPixelRed(image,GetPixelRed(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,GreenQuantum,pixels,exception);
canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelGreen(q,GetPixelGreen(p));
- p++;
- q++;
+ SetPixelGreen(image,GetPixelGreen(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
}
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,BlueQuantum,pixels,exception);
canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelBlue(q,GetPixelBlue(p));
- p++;
- q++;
+ SetPixelBlue(image,GetPixelBlue(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
if (status == MagickFalse)
break;
}
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
{
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,AlphaQuantum,pixels,exception);
exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelOpacity(q,GetPixelOpacity(p));
- p++;
- q++;
+ SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
count=ReadBlob(image,length,pixels);
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,RedQuantum,pixels,exception);
canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelRed(q,GetPixelRed(p));
- p++;
- q++;
+ SetPixelRed(image,GetPixelRed(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
count=ReadBlob(image,length,pixels);
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,GreenQuantum,pixels,exception);
canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelGreen(q,GetPixelGreen(p));
- p++;
- q++;
+ SetPixelGreen(image,GetPixelGreen(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
count=ReadBlob(image,length,pixels);
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,BlueQuantum,pixels,exception);
canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelBlue(q,GetPixelBlue(p));
- p++;
- q++;
+ SetPixelBlue(image,GetPixelBlue(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
if (status == MagickFalse)
break;
}
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
{
(void) CloseBlob(image);
AppendImageFormat("A",image->filename);
count=ReadBlob(image,length,pixels);
for (y=0; y < (ssize_t) image->extract_info.height; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- register PixelPacket
+ register Quantum
*restrict q;
register ssize_t
}
q=GetAuthenticPixels(canvas_image,0,0,canvas_image->columns,1,
exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
length=ImportQuantumPixels(canvas_image,(CacheView *) NULL,
quantum_info,BlueQuantum,pixels,exception);
0,canvas_image->columns,1,exception);
q=GetAuthenticPixels(image,0,y-image->extract_info.y,
image->columns,1,exception);
- if ((p == (const PixelPacket *) NULL) ||
- (q == (PixelPacket *) NULL))
+ if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelOpacity(q,GetPixelOpacity(p));
- p++;
- q++;
+ SetPixelAlpha(image,GetPixelAlpha(canvas_image,p),q);
+ p+=GetPixelChannels(canvas_image);
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
/*
Allocate next image structure.
*/
- AcquireNextImage(image_info,image);
+ AcquireNextImage(image_info,image,exception);
if (GetNextImageInList(image) == (Image *) NULL)
{
image=DestroyImageList(image);
scene++;
} while (count == (ssize_t) length);
quantum_info=DestroyQuantumInfo(quantum_info);
- InheritException(&image->exception,&canvas_image->exception);
canvas_image=DestroyImage(canvas_image);
(void) CloseBlob(image);
return(GetFirstImageInList(image));
% The format of the WriteRGBImage method is:
%
% MagickBooleanType WriteRGBImage(const ImageInfo *image_info,
-% Image *image)
+% Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows.
%
%
% o image: The image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType WriteRGBImage(const ImageInfo *image_info,
- Image *image)
+ Image *image,ExceptionInfo *exception)
{
MagickBooleanType
status;
/*
Open output image file.
*/
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
}
quantum_type=RGBQuantum;
if (LocaleCompare(image_info->magick,"RGBA") == 0)
- {
- quantum_type=RGBAQuantum;
- image->matte=MagickTrue;
- }
+ quantum_type=RGBAQuantum;
if (LocaleCompare(image_info->magick,"RGBO") == 0)
- {
- quantum_type=RGBOQuantum;
- image->matte=MagickTrue;
- }
+ quantum_type=RGBOQuantum;
scene=0;
do
{
/*
Convert MIFF to RGB raster pixels.
*/
- if (image->colorspace != RGBColorspace)
- (void) TransformImageColorspace(image,RGBColorspace);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if ((LocaleCompare(image_info->magick,"RGBA") == 0) &&
- (image->matte == MagickFalse))
- (void) SetImageAlphaChannel(image,ResetAlphaChannel);
+ (image->alpha_trait != BlendPixelTrait))
+ (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
quantum_info=AcquireQuantumInfo(image_info,image);
if (quantum_info == (QuantumInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
*/
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,quantum_type,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ quantum_type,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
*/
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,RedQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ RedQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,GreenQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ GreenQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,BlueQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ BlueQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
if (quantum_type == RGBAQuantum)
{
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,AlphaQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ AlphaQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
}
if (quantum_type == RGBOQuantum)
{
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,OpacityQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ OpacityQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
*/
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,RedQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ RedQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
}
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,GreenQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ GreenQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
}
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,BlueQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ BlueQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
{
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,AlphaQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ AlphaQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
*/
AppendImageFormat("R",image->filename);
status=OpenBlob(image_info,image,scene == 0 ? WriteBinaryBlobMode :
- AppendBinaryBlobMode,&image->exception);
+ AppendBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,RedQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ RedQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
(void) CloseBlob(image);
AppendImageFormat("G",image->filename);
status=OpenBlob(image_info,image,scene == 0 ? WriteBinaryBlobMode :
- AppendBinaryBlobMode,&image->exception);
+ AppendBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,GreenQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ GreenQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
(void) CloseBlob(image);
AppendImageFormat("B",image->filename);
status=OpenBlob(image_info,image,scene == 0 ? WriteBinaryBlobMode :
- AppendBinaryBlobMode,&image->exception);
+ AppendBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,BlueQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ BlueQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;
if (status == MagickFalse)
break;
}
- (void) CloseBlob(image);
if (quantum_type == RGBAQuantum)
{
(void) CloseBlob(image);
AppendImageFormat("A",image->filename);
status=OpenBlob(image_info,image,scene == 0 ? WriteBinaryBlobMode :
- AppendBinaryBlobMode,&image->exception);
+ AppendBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
for (y=0; y < (ssize_t) image->rows; y++)
{
- register const PixelPacket
+ register const Quantum
*restrict p;
- p=GetVirtualPixels(image,0,y,image->columns,1,
- &image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- length=ExportQuantumPixels(image,(const CacheView *) NULL,
- quantum_info,AlphaQuantum,pixels,&image->exception);
+ length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
+ AlphaQuantum,pixels,exception);
count=WriteBlob(image,length,pixels);
if (count != (ssize_t) length)
break;