]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 24 May 2011 13:19:30 +0000 (13:19 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 24 May 2011 13:19:30 +0000 (13:19 +0000)
16 files changed:
coders/gif.c
coders/jbig.c
coders/jpeg.c
coders/map.c
coders/palm.c
coders/png.c
coders/psd.c
coders/wpg.c
coders/xwd.c
magick/colormap.c
magick/compress.c
magick/deprecate.c
magick/image.c
magick/quantum-import.c
magick/threshold.c
magick/xwindow.c

index 2453568d2f3c5b0037ea84ef906a4b329f36c7d6..62be0bf1b20dcc7dad2ef892b2212810e943d131 100644 (file)
@@ -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++;
index 3a0b5a0f2875e482c57901cdcde2bfceda287157..bb5cc99d6ea41e47a63d4f9b6ecb90cd98a12892 100644 (file)
@@ -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)
index 714b6b804dde7db2a08c61839e95f1b5dce18cb6..67f74d1b8f22d0baf0b5c658f42d7fbabe76a9c3 100644 (file)
@@ -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++;
         }
index dc21b7bc216b36e4191e583c44b2fc8fc1522e27..12c9a653217556f99f9e9a94228b5d1cb409e344 100644 (file)
@@ -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;
index 439d73e8576f3ad40ec6bffae92d3521b8446113..42918330337d7d1f3066123074db0f0857feb777 100644 (file)
@@ -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
index 17e5b51a3ae6c4faffc6435b029f73d3c530c7e7..c9c604c2b3222c07f0e4b083c90c42d3a9a11bb8 100644 (file)
@@ -7694,7 +7694,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
 
            if (image->storage_class == PseudoClass && image->colormap != NULL)
            {
-             for (i=0; i<image->colors; 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; i<image->colors; 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; i<image->colors; 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; i<image->colors; 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; i<image->colors; i++)
+             for (i=0; i < (ssize_t) image->colors; i++)
              {
                LBR01RGBOPixelPacketComponent(image->colormap[i]);
              }
index 9739045b2531a93c1834a2778b08bc9627e5bc15..329b9de989f8dd283eda1d615cc9cf138e054145 100644 (file)
@@ -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++;
index d140a712e29b4a4f78bb9de8d6d5c70f2c95bccf..7bdab7f49b767077cfb79704ef766b770c69231e 100644 (file)
@@ -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++;
           }
index 0ad00e3dd153729865ebac366c1f31a0bfc1db85..a53c10925a2b7da634b18d9b26fa06a0105e4c6b 100644 (file)
@@ -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)
index 1955fd80a4479d553a56a2becd435628323c901b..79859790a1fdc670959e82bd7c1e74088015cec1 100644 (file)
@@ -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;
index 571ac961811ed2a25c3b19ccfa25f498ad5cb887..a87919e58f686e3299a10a4f6cefb6838a26783b 100644 (file)
@@ -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;
index 7104315035698f6d0a35fb63b49c8ed38f1b52b7..5ac24256b3eeb7ec1ae7896d42b8a85a7bf17fd5 100644 (file)
@@ -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))
index fb270c994b059947342bbe5071de2fb78b50b14e..cc7b9649f43f19ae1d2e61f536e53cdbbeb0b7e7 100644 (file)
@@ -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)
index 5231cdf85f6ed4e9cb561d4323e9666fc9617fc0..ce31134a2cb95a9d014f3e958e94f628417c2600 100644 (file)
@@ -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,
index d3f49c2b493be57fd9ceb9e7c7463887848cd57b..ab47ab8423d320f6847594a3310424e656cc654a 100644 (file)
@@ -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);
index 61de0a9fef477a2c06f84aa9510233c4025ddab2..178f5e0609ede0c914f16a6202718c7f953cd70c 100644 (file)
@@ -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)