% July 1992 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 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 "MagickCore/studio.h"
#include "MagickCore/attribute.h"
#include "MagickCore/property.h"
#include "MagickCore/blob.h"
Forward declarations.
*/
static MagickBooleanType
- WriteFPXImage(const ImageInfo *,Image *);
+ WriteFPXImage(const ImageInfo *,Image *,ExceptionInfo *);
#endif
\f
/*
image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
- image=AcquireImage(image_info);
+ image=AcquireImage(image_info,exception);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
{
}
(void) CopyMagickString(label,(char *) summary_info.title.ptr,
summary_info.title.length+1);
- (void) SetImageProperty(image,"label",label);
+ (void) SetImageProperty(image,"label",label,exception);
label=DestroyString(label);
}
if (summary_info.comments_valid)
}
(void) CopyMagickString(comments,(char *) summary_info.comments.ptr,
summary_info.comments.length+1);
- (void) SetImageProperty(image,"comment",comments);
+ (void) SetImageProperty(image,"comment",comments,exception);
comments=DestroyString(comments);
}
/*
/*
Create linear colormap.
*/
- if (AcquireImageColormap(image,MaxColormapSize) == MagickFalse)
+ if (AcquireImageColormap(image,MaxColormapSize,exception) == MagickFalse)
{
FPX_ClearSystem();
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
for (y=0; y < (ssize_t) image->rows; y++)
{
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
- if (q == (const Quantum *) NULL)
+ if (q == (Quantum *) NULL)
break;
if ((y % tile_height) == 0)
{
%
% The format of the WriteFPXImage method is:
%
-% MagickBooleanType WriteFPXImage(const ImageInfo *image_info,Image *image)
+% MagickBooleanType WriteFPXImage(const ImageInfo *image_info,
+% 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 void ColorTwistMultiply(FPXColorTwistMatrix first,
*color_twist=result;
}
-static MagickBooleanType WriteFPXImage(const ImageInfo *image_info,Image *image)
+static MagickBooleanType WriteFPXImage(const ImageInfo *image_info,Image *image,
+ ExceptionInfo *exception)
{
FPXBackground
background_color;
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
+ assert(exception != (ExceptionInfo *) NULL);
+ assert(exception->signature == MagickSignature);
+ status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
(void) CloseBlob(image);
*/
image->depth=8;
if (IsRGBColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,RGBColorspace);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
memory_limit=20000000;
fpx_status=FPX_SetToolkitMemoryLimit(&memory_limit);
if (fpx_status != FPX_OK)
if (image->matte != MagickFalse)
colorspace.numberOfComponents=4;
if ((image_info->type != TrueColorType) &&
- IsImageGray(image,&image->exception))
+ (IsImageGray(image,exception) != MagickFalse))
{
colorspace.numberOfComponents=1;
colorspace.theComponents[0].myColor=MONOCHROME;
summary_info.thumbnail_valid=MagickFalse;
summary_info.appname_valid=MagickFalse;
summary_info.security_valid=MagickFalse;
- label=GetImageProperty(image,"label");
+ label=GetImageProperty(image,"label",exception);
if (label != (const char *) NULL)
{
- size_t
- length;
-
/*
Note image label.
*/
(void) CopyMagickString((char *) summary_info.title.ptr,label,
MaxTextExtent);
}
- comment=GetImageProperty(image,"comment");
+ comment=GetImageProperty(image,"comment",exception);
if (comment != (const char *) NULL)
{
/*
quantum_type=GrayQuantum;
for (y=0; y < (ssize_t) image->rows; y++)
{
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
if (p == (const Quantum *) NULL)
break;
length=ExportQuantumPixels(image,(CacheView *) NULL,quantum_info,
- quantum_type,pixels,&image->exception);
+ quantum_type,pixels,exception);
fpx_status=FPX_WriteImageLine(flashpix,&fpx_info);
if (fpx_status != FPX_OK)
break;