From: cristy Date: Tue, 24 May 2011 13:19:30 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~7490 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e08f1130848df134cab76223cc758607d25efa7;p=imagemagick --- diff --git a/coders/gif.c b/coders/gif.c index 2453568d2..62be0bf1b 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -446,7 +446,7 @@ static MagickBooleanType DecodeImage(Image *image,const ssize_t opacity) break; index=ConstrainColormapIndex(image,(size_t) c); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); SetOpacityPixelComponent(q,(ssize_t) index == opacity ? TransparentOpacity : OpaqueOpacity); x++; diff --git a/coders/jbig.c b/coders/jbig.c index 3a0b5a0f2..bb5cc99d6 100644 --- a/coders/jbig.c +++ b/coders/jbig.c @@ -238,7 +238,7 @@ static Image *ReadJBIGImage(const ImageInfo *image_info, if (bit == 8) bit=0; SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } if (SyncAuthenticPixels(image,exception) == MagickFalse) diff --git a/coders/jpeg.c b/coders/jpeg.c index 714b6b804..67f74d1b8 100644 --- a/coders/jpeg.c +++ b/coders/jpeg.c @@ -1246,7 +1246,7 @@ static Image *ReadJPEGImage(const ImageInfo *image_info, pixel=(size_t) ((GETJSAMPLE(*p) ^ 0x80) << 4); index=ConstrainColormapIndex(image,pixel); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); p++; q++; } @@ -1284,7 +1284,7 @@ static Image *ReadJPEGImage(const ImageInfo *image_info, { index=ConstrainColormapIndex(image,(size_t) GETJSAMPLE(*p)); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); p++; q++; } diff --git a/coders/map.c b/coders/map.c index dc21b7bc2..12c9a6532 100644 --- a/coders/map.c +++ b/coders/map.c @@ -228,7 +228,7 @@ static Image *ReadMAPImage(const ImageInfo *image_info,ExceptionInfo *exception) p++; } SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); } if (SyncAuthenticPixels(image,exception) == MagickFalse) break; diff --git a/coders/palm.c b/coders/palm.c index 439d73e85..429183303 100644 --- a/coders/palm.c +++ b/coders/palm.c @@ -494,7 +494,7 @@ static Image *ReadPALMImage(const ImageInfo *image_info, ThrowReaderException(CorruptImageError,"CorruptImage"); index=(IndexPacket) (mask-(((*ptr) & (mask << bit)) >> bit)); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); if (bit) bit-=bits_per_pixel; else diff --git a/coders/png.c b/coders/png.c index 17e5b51a3..c9c604c2b 100644 --- a/coders/png.c +++ b/coders/png.c @@ -7694,7 +7694,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image->storage_class == PseudoClass && image->colormap != NULL) { - for (i=0; icolors; i++) + for (i=0; i < (ssize_t) image->colors; i++) { LBR16RGBOPixelPacketComponent(image->colormap[i]); } @@ -7728,7 +7728,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image->storage_class == PseudoClass && image->colormap != NULL) { - for (i=0; icolors; i++) + for (i=0; i < (ssize_t) image->colors; i++) { LBR08RGBOPixelPacketComponent(image->colormap[i]); } @@ -7761,7 +7761,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image->storage_class == PseudoClass && image->colormap != NULL) { - for (i=0; icolors; i++) + for (i=0; i < (ssize_t) image->colors; i++) { LBR04RGBOPixelPacketComponent(image->colormap[i]); } @@ -7793,7 +7793,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image->storage_class == PseudoClass && image->colormap != NULL) { - for (i=0; icolors; i++) + for (i=0; i < (ssize_t) image->colors; i++) { LBR02RGBOPixelPacketComponent(image->colormap[i]); } @@ -7824,7 +7824,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image->storage_class == PseudoClass && image->colormap != NULL) { - for (i=0; icolors; i++) + for (i=0; i < (ssize_t) image->colors; i++) { LBR01RGBOPixelPacketComponent(image->colormap[i]); } diff --git a/coders/psd.c b/coders/psd.c index 9739045b2..329b9de98 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -653,7 +653,7 @@ static MagickBooleanType ReadPSDLayer(Image *image,const size_t channels, SetIndexPixelComponent(indexes+x,ScaleQuantumToChar(pixel)); else SetIndexPixelComponent(indexes+x,ScaleQuantumToShort(pixel)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); if (image->depth == 1) { @@ -668,7 +668,7 @@ static MagickBooleanType ReadPSDLayer(Image *image,const size_t channels, { SetIndexPixelComponent(indexes+x,(((unsigned char) pixel) & (0x01 << (7-bit))) != 0 ? 0 : 255); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); q++; x++; diff --git a/coders/wpg.c b/coders/wpg.c index d140a712e..7bdab7f49 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -297,7 +297,7 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp) { index=((*p) & (0x80 >> bit) ? 0x01 : 0x00); SetIndexPixelComponent(indexes+x+bit,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } p++; @@ -308,7 +308,7 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp) { index=((*p) & (0x80 >> bit) ? 0x01 : 0x00); SetIndexPixelComponent(indexes+x+bit,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } p++; @@ -327,19 +327,19 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp) { index=ConstrainColormapIndex(image,(*p >> 6) & 0x3); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; index=ConstrainColormapIndex(image,(*p >> 4) & 0x3); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; index=ConstrainColormapIndex(image,(*p >> 2) & 0x3); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; index=ConstrainColormapIndex(image,(*p) & 0x3); SetIndexPixelComponent(indexes+x+1,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); p++; q++; } @@ -347,21 +347,21 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp) { index=ConstrainColormapIndex(image,(*p >> 6) & 0x3); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; if ((image->columns % 4) >= 1) { index=ConstrainColormapIndex(image,(*p >> 4) & 0x3); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; if ((image->columns % 4) >= 2) { index=ConstrainColormapIndex(image,(*p >> 2) & 0x3); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } } @@ -382,11 +382,11 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp) { index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; index=ConstrainColormapIndex(image,(*p) & 0x0f); SetIndexPixelComponent(indexes+x+1,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); p++; q++; } @@ -394,7 +394,7 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp) { index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); p++; q++; } @@ -412,7 +412,7 @@ static void InsertRow(unsigned char *p,ssize_t y,Image *image, int bpp) { index=ConstrainColormapIndex(image,*p); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); p++; q++; } diff --git a/coders/xwd.c b/coders/xwd.c index 0ad00e3dd..a53c10925 100644 --- a/coders/xwd.c +++ b/coders/xwd.c @@ -478,7 +478,7 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception) index=ConstrainColormapIndex(image,XGetPixel(ximage,(int) x, (int) y)); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } if (SyncAuthenticPixels(image,exception) == MagickFalse) diff --git a/magick/colormap.c b/magick/colormap.c index 1955fd80a..79859790a 100644 --- a/magick/colormap.c +++ b/magick/colormap.c @@ -237,7 +237,7 @@ MagickExport MagickBooleanType CycleColormapImage(Image *image, if (index < 0) index+=(ssize_t) image->colors; SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse) @@ -378,7 +378,7 @@ MagickExport MagickBooleanType SortColormapByIntensity(Image *image) { index=(IndexPacket) pixels[(ssize_t) GetIndexPixelComponent(indexes+x)]; SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); } if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse) status=MagickFalse; diff --git a/magick/compress.c b/magick/compress.c index 571ac9618..a87919e58 100644 --- a/magick/compress.c +++ b/magick/compress.c @@ -638,7 +638,7 @@ MagickExport MagickBooleanType HuffmanDecodeImage(Image *image) { index=(IndexPacket) (*p++); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); } if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse) break; diff --git a/magick/deprecate.c b/magick/deprecate.c index 710431503..5ac24256b 100644 --- a/magick/deprecate.c +++ b/magick/deprecate.c @@ -5554,7 +5554,7 @@ MagickExport unsigned int RandomChannelThresholdImage(Image *image,const char threshold=(MagickRealType) QuantumRange*o4[(x%4)+4*(y%4)]; index=(IndexPacket) (intensity <= threshold ? 0 : 1); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } } @@ -6621,7 +6621,7 @@ MagickExport unsigned int ThresholdImage(Image *image,const double threshold) index=(IndexPacket) ((MagickRealType) PixelIntensityToQuantum(q) <= threshold ? 0 : 1); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } if (!SyncAuthenticPixels(image,&image->exception)) diff --git a/magick/image.c b/magick/image.c index fb270c994..cc7b9649f 100644 --- a/magick/image.c +++ b/magick/image.c @@ -4299,9 +4299,9 @@ MagickExport MagickBooleanType SyncImage(Image *image) index=PushColormapIndex(image,(size_t) GetIndexPixelComponent(indexes+x), &range_exception); if (image->matte == MagickFalse) - SetRGBPixelComponent(q,image->colormap+index) + SetRGBPixelComponent(q,image->colormap+(ssize_t) index) else - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse) diff --git a/magick/quantum-import.c b/magick/quantum-import.c index 5231cdf85..ce31134a2 100644 --- a/magick/quantum-import.c +++ b/magick/quantum-import.c @@ -346,7 +346,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, 0x00 : 0x01); SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image, pixel,&range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x+bit)); q++; } @@ -362,7 +362,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, 0x00 : 0x01); SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x+bit)); q++; } @@ -378,13 +378,13 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, pixel=(unsigned char) ((*p >> 4) & 0xf); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); q++; pixel=(unsigned char) ((*p) & 0xf); SetIndexPixelComponent(indexes+x+1,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x+1)); p++; q++; @@ -394,7 +394,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, pixel=(unsigned char) ((*p++ >> 4) & 0xf); SetIndexPixelComponent(indexes+x+bit,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x+bit)); q++; } @@ -410,7 +410,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushCharPixel(p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p+=quantum_info->pad; q++; @@ -430,7 +430,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, SetIndexPixelComponent(indexes+x,PushColormapIndex(image, ClampToQuantum((MagickRealType) QuantumRange* HalfToSinglePrecision(pixel)),&range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p+=quantum_info->pad; q++; @@ -442,7 +442,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushShortPixel(endian,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p+=quantum_info->pad; q++; @@ -464,7 +464,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushFloatPixel(&quantum_state,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image, ClampToQuantum(pixel),&range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p+=quantum_info->pad; q++; @@ -476,7 +476,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushLongPixel(endian,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p+=quantum_info->pad; q++; @@ -495,7 +495,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushDoublePixel(&quantum_state,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image, ClampToQuantum(pixel),&range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p+=quantum_info->pad; q++; @@ -510,7 +510,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p+=quantum_info->pad; q++; @@ -590,7 +590,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, pixel=(unsigned char) ((*p >> 4) & 0xf); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); pixel=(unsigned char) ((*p) & 0xf); SetOpacityPixelComponent(q,QuantumRange-ScaleAnyToQuantum(pixel, @@ -610,7 +610,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushCharPixel(p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p=PushCharPixel(p,&pixel); SetOpacityPixelComponent(q,QuantumRange-ScaleCharToQuantum(pixel)); @@ -632,7 +632,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, SetIndexPixelComponent(indexes+x,PushColormapIndex(image, ClampToQuantum((MagickRealType) QuantumRange* HalfToSinglePrecision(pixel)),&range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p=PushShortPixel(endian,p,&pixel); SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum( @@ -647,7 +647,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushShortPixel(endian,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p=PushShortPixel(endian,p,&pixel); SetOpacityPixelComponent(q,QuantumRange-ScaleShortToQuantum(pixel)); @@ -671,7 +671,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushFloatPixel(&quantum_state,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image, ClampToQuantum(pixel),&range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p=PushFloatPixel(&quantum_state,p,&pixel); SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum(pixel)); @@ -685,7 +685,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushLongPixel(endian,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p=PushLongPixel(endian,p,&pixel); SetOpacityPixelComponent(q,QuantumRange-ScaleLongToQuantum(pixel)); @@ -706,7 +706,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushDoublePixel(&quantum_state,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image, ClampToQuantum(pixel),&range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p=PushDoublePixel(&quantum_state,p,&pixel); SetOpacityPixelComponent(q,QuantumRange-ClampToQuantum(pixel)); @@ -724,7 +724,7 @@ MagickExport size_t ImportQuantumPixels(Image *image,CacheView *image_view, p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel); SetIndexPixelComponent(indexes+x,PushColormapIndex(image,pixel, &range_exception)); - SetRGBOPixelComponent(q,image->colormap+ + SetRGBOPixelComponent(q,image->colormap+(ssize_t) GetIndexPixelComponent(indexes+x)); p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel); SetOpacityPixelComponent(q,QuantumRange-ScaleAnyToQuantum(pixel, diff --git a/magick/threshold.c b/magick/threshold.c index d3f49c2b4..ab47ab842 100644 --- a/magick/threshold.c +++ b/magick/threshold.c @@ -1779,7 +1779,7 @@ MagickExport MagickBooleanType RandomThresholdImageChannel(Image *image, GetPseudoRandomValue(random_info[id])); index=(IndexPacket) (intensity <= threshold.index ? 0 : 1); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,image->colormap+index); + SetRGBOPixelComponent(q,image->colormap+(ssize_t) index); q++; } sync=SyncCacheViewAuthenticPixels(image_view,exception); diff --git a/magick/xwindow.c b/magick/xwindow.c index 61de0a9fe..178f5e060 100644 --- a/magick/xwindow.c +++ b/magick/xwindow.c @@ -4458,7 +4458,8 @@ static Image *XGetWindowImage(Display *display,const Window window, { index=(IndexPacket) XGetPixel(ximage,x,y); SetIndexPixelComponent(indexes+x,index); - SetRGBOPixelComponent(q,composite_image->colormap+index); + SetRGBOPixelComponent(q,composite_image->colormap+(ssize_t) + index); q++; } if (SyncCacheViewAuthenticPixels(composite_view,exception) == MagickFalse)