% July 1992 %
% %
% %
-% Copyright 1999-2010 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 "magick/studio.h"
-#include "magick/property.h"
-#include "magick/blob.h"
-#include "magick/blob-private.h"
-#include "magick/cache.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/quantum-private.h"
-#include "magick/static.h"
-#include "magick/string_.h"
-#include "magick/module.h"
+#include "MagickCore/studio.h"
+#include "MagickCore/property.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/cache.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/string_.h"
+#include "MagickCore/module.h"
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
length,
runlength;
- ssize_t
- y;
-
- ssize_t
- *scanlines;
-
MagickBooleanType
status;
i,
x;
- register PixelPacket
+ register Quantum
*q;
ssize_t
- count;
+ count,
+ *scanlines,
+ y;
RLAInfo
rla_info;
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)
{
count=ReadBlob(image,24,(unsigned char *) rla_info.green_primary);
count=ReadBlob(image,24,(unsigned char *) rla_info.blue_primary);
count=ReadBlob(image,24,(unsigned char *) rla_info.white_point);
- rla_info.job_number=(ssize_t) ReadBlobMSBLong(image);
+ rla_info.job_number=(int) ReadBlobMSBLong(image);
count=ReadBlob(image,128,(unsigned char *) rla_info.name);
count=ReadBlob(image,128,(unsigned char *) rla_info.description);
count=ReadBlob(image,64,(unsigned char *) rla_info.program);
count=ReadBlob(image,36,(unsigned char *) rla_info.space);
if ((size_t) count != 36)
ThrowReaderException(CorruptImageError,"UnableToReadImageData");
- rla_info.next=(ssize_t) ReadBlobMSBLong(image);
+ rla_info.next=(int) ReadBlobMSBLong(image);
/*
Initialize image structure.
*/
if (scanlines == (ssize_t *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
if (*rla_info.description != '\0')
- (void) SetImageProperty(image,"comment",rla_info.description);
+ (void) SetImageProperty(image,"comment",rla_info.description,exception);
/*
Read offsets to each scanline data.
*/
for (i=0; i < (ssize_t) image->rows; i++)
- scanlines[i]=(ssize_t) ReadBlobMSBLong(image);
+ scanlines[i]=(int) ReadBlobMSBLong(image);
/*
Read image data.
*/
{
q=GetAuthenticPixels(image,(ssize_t) (x % image->columns),
(ssize_t) (y % image->rows),1,1,exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
byte=(unsigned char) ReadBlobByte(image);
length--;
{
case 0:
{
- q->red=ScaleCharToQuantum(byte);
+ SetPixelRed(image,ScaleCharToQuantum(byte),q);
break;
}
case 1:
{
- q->green=ScaleCharToQuantum(byte);
+ SetPixelGreen(image,ScaleCharToQuantum(byte),q);
break;
}
case 2:
{
- q->blue=ScaleCharToQuantum(byte);
+ SetPixelBlue(image,ScaleCharToQuantum(byte),q);
break;
}
case 3:
default:
{
- q->opacity=(Quantum) (QuantumRange-ScaleCharToQuantum(byte));
+ SetPixelAlpha(image,ScaleCharToQuantum(byte),q);
break;
}
}
{
q=GetAuthenticPixels(image,(ssize_t) (x % image->columns),
(ssize_t) (y % image->rows),1,1,exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
switch (channel)
{
case 0:
{
- q->red=ScaleCharToQuantum(byte);
+ SetPixelRed(image,ScaleCharToQuantum(byte),q);
break;
}
case 1:
{
- q->green=ScaleCharToQuantum(byte);
+ SetPixelGreen(image,ScaleCharToQuantum(byte),q);
break;
}
case 2:
{
- q->blue=ScaleCharToQuantum(byte);
+ SetPixelBlue(image,ScaleCharToQuantum(byte),q);
break;
}
case 3:
default:
{
- q->opacity=(Quantum) (QuantumRange-ScaleCharToQuantum(byte));
+ SetPixelAlpha(image,ScaleCharToQuantum(byte),q);
break;
}
}
while (runlength > 0);
}
}
- status=SetImageProgress(image,LoadImageTag,y,image->rows);
+ status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
+ image->rows);
if (status == MagickFalse)
break;
}
entry=SetMagickInfo("RLA");
entry->decoder=(DecodeImageHandler *) ReadRLAImage;
entry->adjoin=MagickFalse;
+ entry->seekable_stream=MagickTrue;
entry->description=ConstantString("Alias/Wavefront image");
entry->module=ConstantString("RLA");
(void) RegisterMagickInfo(entry);