% July 1992 %
% %
% %
-% Copyright 1999-2011 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 %
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");
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
*/
image->storage_class=PseudoClass;
status=AcquireImageColormap(image,(size_t)
- (image->offset != 0 ? image->offset : 256));
+ (image->offset != 0 ? image->offset : 256),exception);
if (status == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
depth=GetImageQuantumDepth(image,MagickTrue);
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- index=ConstrainColormapIndex(image,*p);
+ index=ConstrainColormapIndex(image,*p,exception);
p++;
if (image->colors > 256)
{
- index=ConstrainColormapIndex(image,((size_t) index << 8)+(*p));
+ index=ConstrainColormapIndex(image,((size_t) index << 8)+(*p),
+ exception);
p++;
}
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if (IsRGBColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,RGBColorspace);
+ if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Allocate colormap.
*/
if (IsPaletteImage(image,exception) == MagickFalse)
- (void) SetImageType(image,PaletteType);
+ (void) SetImageType(image,PaletteType,exception);
depth=GetImageQuantumDepth(image,MagickTrue);
packet_size=(size_t) (depth/8);
pixels=(unsigned char *) AcquireQuantumMemory(image->columns,packet_size*