]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 30 May 2010 00:23:21 +0000 (00:23 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 30 May 2010 00:23:21 +0000 (00:23 +0000)
coders/palm.c

index 55bdf8a5cc4330640994986c23756f6725fb2e55..15b920c69949fce5f4573ebb265de34b6950f2d7 100644 (file)
@@ -733,7 +733,7 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
     if (image->colorspace != RGBColorspace)
       (void) TransformImageColorspace(image,RGBColorspace);
     count=GetNumberColors(image,NULL,&exception);
-    for (bits_per_pixel=1;  (1UL << bits_per_pixel) < count;  bits_per_pixel*=2) ;
+    for (bits_per_pixel=1;  (one << bits_per_pixel) < count; bits_per_pixel*=2) ;
     if (image_info->depth > 100)
       bits_per_pixel=image_info->depth-100;
     if (bits_per_pixel < 16)
@@ -876,10 +876,10 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
               color=(unsigned char) indexes[x];
             else
               color=(unsigned char) (indexes[x]*((one << bits_per_pixel)-1)/
-                MagickMax(1L*image->colors-1L,1L));
+                MagickMax(1*image->colors-1,1));
             byte|=color << bit;
             if (bit != 0)
-              bit-=bits_per_pixel;
+              bit-=(ssize_t) bits_per_pixel;
             else
               {
                 *ptr++=byte;