% June 2000 %
% %
% %
-% Copyright 1999-2009 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/color-private.h"
-#include "magick/colormap-private.h"
-#include "magick/constitute.h"
-#include "magick/exception.h"
-#include "magick/exception-private.h"
-#include "magick/cache.h"
-#include "magick/image.h"
-#include "magick/image-private.h"
-#include "magick/list.h"
-#include "magick/magic.h"
-#include "magick/magick.h"
-#include "magick/memory_.h"
-#include "magick/resource_.h"
-#include "magick/quantum-private.h"
-#include "magick/shear.h"
-#include "magick/static.h"
-#include "magick/string_.h"
-#include "magick/module.h"
-#include "magick/transform.h"
-#include "magick/utility.h"
+#include "MagickCore/studio.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/color-private.h"
+#include "MagickCore/colormap.h"
+#include "MagickCore/colormap-private.h"
+#include "MagickCore/constitute.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/exception-private.h"
+#include "MagickCore/cache.h"
+#include "MagickCore/distort.h"
+#include "MagickCore/image.h"
+#include "MagickCore/image-private.h"
+#include "MagickCore/list.h"
+#include "MagickCore/magic.h"
+#include "MagickCore/magick.h"
+#include "MagickCore/memory_.h"
+#include "MagickCore/resource_.h"
+#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/quantum-private.h"
+#include "MagickCore/static.h"
+#include "MagickCore/string_.h"
+#include "MagickCore/module.h"
+#include "MagickCore/transform.h"
+#include "MagickCore/utility.h"
+#include "MagickCore/utility-private.h"
\f
typedef struct
{
}
\f
-static void Rd_WP_DWORD(Image *image,unsigned long *d)
+static void Rd_WP_DWORD(Image *image,size_t *d)
{
unsigned char
b;
if (b < 0xFFU)
return;
b=ReadBlobByte(image);
- *d=(unsigned long) b;
+ *d=(size_t) b;
b=ReadBlobByte(image);
- *d+=(unsigned long) b*256l;
+ *d+=(size_t) b*256l;
if (*d < 0x8000)
return;
*d=(*d & 0x7FFF) << 16;
b=ReadBlobByte(image);
- *d+=(unsigned long) b;
+ *d+=(size_t) b;
b=ReadBlobByte(image);
- *d+=(unsigned long) b*256l;
+ *d+=(size_t) b*256l;
return;
}
-static void InsertRow(unsigned char *p,long y,Image *image, int bpp)
+static void InsertRow(Image *image,unsigned char *p,ssize_t y,int bpp,
+ ExceptionInfo *exception)
{
- ExceptionInfo
- *exception;
-
int
bit;
- long
- x;
+ Quantum
+ index;
- register PixelPacket
+ register Quantum
*q;
- IndexPacket
- index;
-
- register IndexPacket
- *indexes;
+ ssize_t
+ x;
- exception=(&image->exception);
switch (bpp)
{
case 1: /* Convert bitmap scanline. */
{
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
- indexes=GetAuthenticIndexQueue(image);
- for (x=0; x < ((long) image->columns-7); x+=8)
+ for (x=0; x < ((ssize_t) image->columns-7); x+=8)
+ {
+ for (bit=0; bit < 8; bit++)
{
- for (bit=0; bit < 8; bit++)
- {
- index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
- indexes[x+bit]=index;
- *q++=image->colormap[(int) index];
- }
- p++;
+ index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
}
+ p++;
+ }
if ((image->columns % 8) != 0)
{
- for (bit=0; bit < (long) (image->columns % 8); bit++)
- {
- index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
- indexes[x+bit]=index;
- *q++=image->colormap[(int) index];
- }
+ for (bit=0; bit < (ssize_t) (image->columns % 8); bit++)
+ {
+ index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
+ }
p++;
}
if (!SyncAuthenticPixels(image,exception))
case 2: /* Convert PseudoColor scanline. */
{
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
- indexes=GetAuthenticIndexQueue(image);
- for (x=0; x < ((long) image->columns-1); x+=2)
+ for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
- index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
- index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
- index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
- index=ConstrainColormapIndex(image,(*p) & 0x3);
- indexes[x+1]=index;
- *q++=image->colormap[(long) index];
+ index=ConstrainColormapIndex(image,(*p >> 6) & 0x3,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
+ index=ConstrainColormapIndex(image,(*p >> 4) & 0x3,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
+ index=ConstrainColormapIndex(image,(*p >> 2) & 0x3,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
+ index=ConstrainColormapIndex(image,(*p) & 0x3,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
p++;
+ q+=GetPixelChannels(image);
}
if ((image->columns % 4) != 0)
{
- index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
+ index=ConstrainColormapIndex(image,(*p >> 6) & 0x3,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
if ((image->columns % 4) >= 1)
{
- index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
+ index=ConstrainColormapIndex(image,(*p >> 4) & 0x3,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
if ((image->columns % 4) >= 2)
{
- index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
+ index=ConstrainColormapIndex(image,(*p >> 2) & 0x3,
+ exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
}
}
p++;
case 4: /* Convert PseudoColor scanline. */
{
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
- indexes=GetAuthenticIndexQueue(image);
- for (x=0; x < ((long) image->columns-1); x+=2)
+ for (x=0; x < ((ssize_t) image->columns-1); x+=2)
{
- index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
- index=ConstrainColormapIndex(image,(*p) & 0x0f);
- indexes[x+1]=index;
- *q++=image->colormap[(long) index];
+ index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
+ q+=GetPixelChannels(image);
+ index=ConstrainColormapIndex(image,(*p) & 0x0f,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
p++;
+ q+=GetPixelChannels(image);
}
if ((image->columns % 2) != 0)
{
- index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
+ index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
p++;
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
case 8: /* Convert PseudoColor scanline. */
{
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
- if (q == (PixelPacket *) NULL) break;
- indexes=GetAuthenticIndexQueue(image);
+ if (q == (Quantum *) NULL) break;
- for (x=0; x < (long) image->columns; x++)
+ for (x=0; x < (ssize_t) image->columns; x++)
{
- index=ConstrainColormapIndex(image,*p);
- indexes[x]=index;
- *q++=image->colormap[(long) index];
+ index=ConstrainColormapIndex(image,*p,exception);
+ SetPixelIndex(image,index,q);
+ SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
p++;
+ q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
case 24: /* Convert DirectColor scanline. */
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
- if (q == (PixelPacket *) NULL)
+ if (q == (Quantum *) NULL)
break;
- for (x=0; x < (long) image->columns; x++)
+ for (x=0; x < (ssize_t) image->columns; x++)
{
- q->red=ScaleCharToQuantum(*p++);
- q->green=ScaleCharToQuantum(*p++);
- q->blue=ScaleCharToQuantum(*p++);
- q++;
+ SetPixelRed(image,ScaleCharToQuantum(*p++),q);
+ SetPixelGreen(image,ScaleCharToQuantum(*p++),q);
+ SetPixelBlue(image,ScaleCharToQuantum(*p++),q);
+ q+=GetPixelChannels(image);
}
if (!SyncAuthenticPixels(image,exception))
break;
{ \
BImgBuff[x]=b; \
x++; \
- if((long) x>=ldblk) \
+ if((ssize_t) x>=ldblk) \
{ \
- InsertRow(BImgBuff,(long) y,image,bpp); \
+ InsertRow(image,BImgBuff,(ssize_t) y,bpp,exception); \
x=0; \
y++; \
} \
}
/* WPG1 raster reader. */
-static int UnpackWPGRaster(Image *image,int bpp)
+static int UnpackWPGRaster(Image *image,int bpp,ExceptionInfo *exception)
{
int
x,
*BImgBuff,
RunCount;
- long
+ ssize_t
ldblk;
x=0;
y=0;
- ldblk=(long) ((bpp*image->columns+7)/8);
+ ldblk=(ssize_t) ((bpp*image->columns+7)/8);
BImgBuff=(unsigned char *) AcquireQuantumMemory((size_t) ldblk,
sizeof(*BImgBuff));
if(BImgBuff==NULL) return(-2);
- while(y<(long) image->rows)
+ while(y<(ssize_t) image->rows)
{
bbuf=ReadBlobByte(image);
x=0;
y++; /* Here I need to duplicate previous row RUNCOUNT* */
if(y<2) continue;
- if(y>(long) image->rows)
+ if(y>(ssize_t) image->rows)
{
BImgBuff=(unsigned char *) RelinquishMagickMemory(BImgBuff);
return(-4);
}
- InsertRow(BImgBuff,y-1,image,bpp);
+ InsertRow(image,BImgBuff,y-1,bpp,exception);
}
}
}
else\
BImgBuff[x] = b;\
x++; \
- if((long) x >= ldblk) \
+ if((ssize_t) x >= ldblk) \
{ \
- InsertRow(BImgBuff,(long) y,image,bpp); \
+ InsertRow(image,BImgBuff,(ssize_t) y,bpp,exception); \
x=0; \
y++; \
} \
}
/* WPG2 raster reader. */
-static int UnpackWPG2Raster(Image *image,int bpp)
+static int UnpackWPG2Raster(Image *image,int bpp,ExceptionInfo *exception)
{
+ size_t
+ x,
+ y;
+
+ ssize_t
+ ldblk;
+
+ int XorMe = 0;
+
unsigned int
SampleSize=1;
RunCount,
SampleBuffer[8];
- unsigned long
- x,
- y;
-
unsigned int
i;
- long
- ldblk;
-
- int XorMe = 0;
-
x=0;
y=0;
- ldblk=(long) ((bpp*image->columns+7)/8);
+ ldblk=(ssize_t) ((bpp*image->columns+7)/8);
BImgBuff=(unsigned char *) AcquireQuantumMemory((size_t) ldblk,
sizeof(*BImgBuff));
if(BImgBuff==NULL)
return(-2);
break;
case 0x7E:
- (void) fprintf(stderr,"\nUnsupported WPG token XOR, please report!");
- XorMe=!XorMe;
+ (void) FormatLocaleFile(stderr,
+ "\nUnsupported WPG token XOR, please report!");
+ XorMe=!XorMe;
break;
case 0x7F:
RunCount=ReadBlobByte(image); /* BLK */
}
break;
case 0xFD:
- RunCount=ReadBlobByte(image); /* EXT */
- for(i=0; i<= RunCount;i++)
+ RunCount=ReadBlobByte(image); /* EXT */
+ for(i=0; i<= RunCount;i++)
for(bbuf=0; bbuf < SampleSize; bbuf++)
InsertByte6(SampleBuffer[bbuf]);
break;
RunCount=ReadBlobByte(image); /* RST */
if(x!=0)
{
- (void) fprintf(stderr,
- "\nUnsupported WPG2 unaligned token RST x=%lu, please report!\n"
- ,x);
+ (void) FormatLocaleFile(stderr,
+ "\nUnsupported WPG2 unaligned token RST x=%.20g, please report!\n"
+ ,(double) x);
return(-3);
}
{
/* duplicate the previous row RunCount x */
for(i=0;i<=RunCount;i++)
{
- InsertRow(BImgBuff,(long) (image->rows >= y ? y : image->rows-1),
- image,bpp);
+ InsertRow(image,BImgBuff,(ssize_t) (image->rows >= y ? y : image->rows-1),
+ bpp,exception);
y++;
}
}
static unsigned LoadWPG2Flags(Image *image,char Precision,float *Angle,tCTM *CTM)
{
const unsigned char TPR=1,TRN=2,SKW=4,SCL=8,ROT=0x10,OID=0x20,LCK=0x80;
-long x;
+ssize_t x;
unsigned DenX;
unsigned Flags;
static Image *ExtractPostscript(Image *image,const ImageInfo *image_info,
- MagickOffsetType PS_Offset,long PS_Size,ExceptionInfo *exception)
+ MagickOffsetType PS_Offset,ssize_t PS_Size,ExceptionInfo *exception)
{
char
postscript_file[MaxTextExtent];
/* Obtain temporary file */
AcquireUniqueFilename(postscript_file);
- ps_file=OpenMagickStream(postscript_file,"wb");
+ ps_file=fopen_utf8(postscript_file,"wb");
if (ps_file == (FILE *) NULL)
goto FINISH;
(void) CopyMagickMemory(clone_info->magick,magic_info->name,MaxTextExtent);
/* Read nested image */
- /*FormatString(clone_info->filename,"%s:%.1024s",magic_info->name,postscript_file);*/
- FormatMagickString(clone_info->filename,MaxTextExtent,"%.1024s",postscript_file);
+ /*FormatString(clone_info->filename,"%s:%s",magic_info->name,postscript_file);*/
+ FormatLocaleString(clone_info->filename,MaxTextExtent,"%s",postscript_file);
image2=ReadImage(clone_info,exception);
if (!image2)
{
typedef struct
{
- unsigned long FileId;
+ size_t FileId;
MagickOffsetType DataOffset;
unsigned int ProductType;
unsigned int FileType;
typedef struct
{
unsigned char RecType;
- unsigned long RecordLength;
+ size_t RecordLength;
} WPGRecord;
typedef struct
{
unsigned char Class;
unsigned char RecType;
- unsigned long Extension;
- unsigned long RecordLength;
+ size_t Extension;
+ size_t RecordLength;
} WPG2Record;
typedef struct
} WPGColorMapRec;
typedef struct {
- unsigned long PS_unknown1;
+ size_t PS_unknown1;
unsigned int PS_unknown2;
unsigned int PS_unknown3;
} WPGPSl1Record;
bpp,
WPG2Flags;
- long
+ ssize_t
ldblk;
+ size_t
+ one;
+
unsigned char
*BImgBuff;
assert(image_info->signature == MagickSignature);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
- image=AcquireImage(image_info);
+ one=1;
+ image=AcquireImage(image_info,exception);
image->depth=8;
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
if(BitmapHeader1.HorzRes && BitmapHeader1.VertRes)
{
image->units=PixelsPerCentimeterResolution;
- image->x_resolution=BitmapHeader1.HorzRes/470.0;
- image->y_resolution=BitmapHeader1.VertRes/470.0;
+ image->resolution.x=BitmapHeader1.HorzRes/470.0;
+ image->resolution.y=BitmapHeader1.VertRes/470.0;
}
image->columns=BitmapHeader1.Width;
image->rows=BitmapHeader1.Heigth;
WPG_Palette.NumOfEntries=ReadBlobLSBShort(image);
image->colors=WPG_Palette.NumOfEntries;
- if (!AcquireImageColormap(image,image->colors))
+ if (!AcquireImageColormap(image,image->colors,exception))
goto NoMemory;
for (i=WPG_Palette.StartIndex;
i < (int)WPG_Palette.NumOfEntries; i++)
if(Rec.RecordLength > 8)
image=ExtractPostscript(image,image_info,
TellBlob(image)+8, /* skip PS header in the wpg */
- (long) Rec.RecordLength-8,exception);
+ (ssize_t) Rec.RecordLength-8,exception);
break;
case 0x14: /* bitmap type 2 */
image->page.y=(int) (BitmapHeader2.LowLeftX/470.0);
if(BitmapHeader2.HorzRes && BitmapHeader2.VertRes)
{
- image->x_resolution=BitmapHeader2.HorzRes/470.0;
- image->y_resolution=BitmapHeader2.VertRes/470.0;
+ image->resolution.x=BitmapHeader2.HorzRes/470.0;
+ image->resolution.y=BitmapHeader2.VertRes/470.0;
}
image->columns=BitmapHeader2.Width;
image->rows=BitmapHeader2.Heigth;
UnpackRaster:
if ((image->colors == 0) && (bpp != 24))
{
- image->colors=1 << bpp;
- if (!AcquireImageColormap(image,image->colors))
+ image->colors=one << bpp;
+ if (!AcquireImageColormap(image,image->colors,exception))
{
NoMemory:
ThrowReaderException(ResourceLimitError,
else
{
if (bpp < 24)
- if ( (image->colors < (1UL<<bpp)) && (bpp != 24) )
- image->colormap=(PixelPacket *) ResizeQuantumMemory(
- image->colormap,(size_t) (1UL << bpp),
+ if ( (image->colors < (one << bpp)) && (bpp != 24) )
+ image->colormap=(PixelInfo *) ResizeQuantumMemory(
+ image->colormap,(size_t) (one << bpp),
sizeof(*image->colormap));
}
}
}
- if(UnpackWPGRaster(image,bpp) < 0)
+ if(UnpackWPGRaster(image,bpp,exception) < 0)
/* The raster cannot be unpacked */
{
DecompressionFailed:
}
/* Allocate next image structure. */
- AcquireNextImage(image_info,image);
+ AcquireNextImage(image_info,image,exception);
image->depth=8;
if (image->next == (Image *) NULL)
goto Finish;
if(Rec.RecordLength>0x3C)
image=ExtractPostscript(image,image_info,
TellBlob(image)+0x3C, /* skip PS l2 header in the wpg */
- (long) Rec.RecordLength-0x3C,exception);
+ (ssize_t) Rec.RecordLength-0x3C,exception);
break;
}
}
WPG_Palette.NumOfEntries=ReadBlobLSBShort(image);
image->colors=WPG_Palette.NumOfEntries;
- if (AcquireImageColormap(image,image->colors) == MagickFalse)
+ if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
for (i=WPG_Palette.StartIndex;
if ((image->colors == 0) && (bpp != 24))
{
- image->colors=1 << bpp;
- if (!AcquireImageColormap(image,image->colors))
+ size_t
+ one;
+
+ one=1;
+ image->colors=one << bpp;
+ if (!AcquireImageColormap(image,image->colors,exception))
goto NoMemory;
}
else
{
if(bpp < 24)
- if( image->colors<(1UL<<bpp) && bpp!=24 )
- image->colormap=(PixelPacket *) ResizeQuantumMemory(
- image->colormap,(size_t) (1UL << bpp),
+ if( image->colors<(one << bpp) && bpp!=24 )
+ image->colormap=(PixelInfo *) ResizeQuantumMemory(
+ image->colormap,(size_t) (one << bpp),
sizeof(*image->colormap));
}
{
case 0: /*Uncompressed raster*/
{
- ldblk=(long) ((bpp*image->columns+7)/8);
+ ldblk=(ssize_t) ((bpp*image->columns+7)/8);
BImgBuff=(unsigned char *) AcquireQuantumMemory((size_t)
ldblk,sizeof(*BImgBuff));
if (BImgBuff == (unsigned char *) NULL)
goto NoMemory;
- for(i=0; i< (long) image->rows; i++)
+ for(i=0; i< (ssize_t) image->rows; i++)
{
(void) ReadBlob(image,ldblk,BImgBuff);
- InsertRow(BImgBuff,i,image,bpp);
+ InsertRow(image,BImgBuff,i,bpp,exception);
}
if(BImgBuff)
}
case 1: /*RLE for WPG2 */
{
- if( UnpackWPG2Raster(image,bpp) < 0)
+ if( UnpackWPG2Raster(image,bpp,exception) < 0)
goto DecompressionFailed;
break;
}
/* Allocate next image structure. */
- AcquireNextImage(image_info,image);
+ AcquireNextImage(image_info,image,exception);
image->depth=8;
if (image->next == (Image *) NULL)
goto Finish;
if(Rec2.RecordLength > (unsigned int) i)
image=ExtractPostscript(image,image_info,
TellBlob(image)+i, /*skip PS header in the wpg2*/
- (long) (Rec2.RecordLength-i-2),exception);
+ (ssize_t) (Rec2.RecordLength-i-2),exception);
break;
case 0x1B: /*bitmap rectangle*/
WPG2Flags = LoadWPG2Flags(image,StartWPG.PosSizePrecision,NULL,&CTM);
+ (void) WPG2Flags;
break;
}
}
Image
*p;
- long
+ ssize_t
scene=0;
/*
Fix scene numbers.
*/
for (p=image; p != (Image *) NULL; p=p->next)
- p->scene=(unsigned long) scene++;
+ p->scene=(size_t) scene++;
}
if (image == (Image *) NULL)
ThrowReaderException(CorruptImageError,
%
% The format of the RegisterWPGImage method is:
%
-% unsigned long RegisterWPGImage(void)
+% size_t RegisterWPGImage(void)
%
*/
-ModuleExport unsigned long RegisterWPGImage(void)
+ModuleExport size_t RegisterWPGImage(void)
{
MagickInfo
*entry;