]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 6 Mar 2011 15:02:54 +0000 (15:02 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 6 Mar 2011 15:02:54 +0000 (15:02 +0000)
ChangeLog
coders/png.c
coders/psd.c

index 558718be2b38e772e711b79d1c250aacea1a18d7..5cea1e077f5006b7ad14b373152ae32a8037419e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-2011-04-05  6.6.8-0 Cristy  <quetzlzacatenango@image...>
+2011-03-06  6.6.8-1 Cristy  <quetzlzacatenango@image...>
+  * New version 6.6.8-1.
+
+2011-03-05  6.6.8-1 Cristy  <quetzlzacatenango@image...>
+  * Support PSD files with one layer and one composite layer.
+  * We must cast a Quantum type when bit shifting and HDRI is enabled.
+
+2011-03-05  6.6.8-0 Cristy  <quetzlzacatenango@image...>
   * New version 6.6.8-0.
 
 2011-02-27  6.6.8-0 Cristy  <quetzlzacatenango@image...>
index fc9101e4563085f0b7b378e2225a2f555c534cb1..1086c3b1b921a985f1d649b3622873b39159158e 100644 (file)
@@ -7506,18 +7506,18 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
                "    Quantizing the background color to 3-3-2");
 
         image->background_color.red=
-             ((((image->background_color.red >> PNGK) & 0xe0)     )  |
-              (((image->background_color.red >> PNGK) & 0xe0) >> 3)  |
-              (((image->background_color.red >> PNGK) & 0xc0) >> 6)) * PNGM;
+             ((((((size_t) image->background_color.red) >> PNGK) & 0xe0)     )  |
+              (((((size_t) image->background_color.red) >> PNGK) & 0xe0) >> 3)  |
+              (((((size_t) image->background_color.red) >> PNGK) & 0xc0) >> 6)) * PNGM;
         image->background_color.green=
-             ((((image->background_color.green >> PNGK) & 0xe0)     )  |
-              (((image->background_color.green >> PNGK) & 0xe0) >> 3)  |
-              (((image->background_color.green >> PNGK) & 0xc0) >> 6)) * PNGM;
+             ((((((size_t) image->background_color.green) >> PNGK) & 0xe0)     )  |
+              (((((size_t) image->background_color.green) >> PNGK) & 0xe0) >> 3)  |
+              (((((size_t) image->background_color.green) >> PNGK) & 0xc0) >> 6)) * PNGM;
         image->background_color.blue=
-             ((((image->background_color.blue >> PNGK) & 0xc0)     )  |
-              (((image->background_color.blue >> PNGK) & 0xc0) >> 2)  |
-              (((image->background_color.blue >> PNGK) & 0xc0) >> 4)  |
-              (((image->background_color.blue >> PNGK) & 0xc0) >> 6)) * PNGM;
+             ((((((size_t) image->background_color.blue) >> PNGK) & 0xc0)     )  |
+              (((((size_t) image->background_color.blue) >> PNGK) & 0xc0) >> 2)  |
+              (((((size_t) image->background_color.blue) >> PNGK) & 0xc0) >> 4)  |
+              (((((size_t) image->background_color.blue) >> PNGK) & 0xc0) >> 6)) * PNGM;
 
         if (logging != MagickFalse)
           (void) LogMagickEvent(CoderEvent,GetMagickModule(),
@@ -7536,18 +7536,18 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
             for (x=0; x < (ssize_t) image->columns; x++)
             {
               r->red=
-                   ((((r->red >> PNGK) & 0xe0)     )  |
-                    (((r->red >> PNGK) & 0xe0) >> 3)  |
-                    (((r->red >> PNGK) & 0xc0) >> 6)) * PNGM;
+                   ((((((size_t) r->red) >> PNGK) & 0xe0)     )  |
+                    (((((size_t) r->red) >> PNGK) & 0xe0) >> 3)  |
+                    (((((size_t) r->red) >> PNGK) & 0xc0) >> 6)) * PNGM;
               r->green=
-                   ((((r->green >> PNGK) & 0xe0)     )  |
-                    (((r->green >> PNGK) & 0xe0) >> 3)  |
-                    (((r->green >> PNGK) & 0xc0) >> 6)) * PNGM;
+                   ((((((size_t) r->green) >> PNGK) & 0xe0)     )  |
+                    (((((size_t) r->green) >> PNGK) & 0xe0) >> 3)  |
+                    (((((size_t) r->green) >> PNGK) & 0xc0) >> 6)) * PNGM;
               r->blue=
-                   ((((r->blue >> PNGK) & 0xc0)     )  |
-                    (((r->blue >> PNGK) & 0xc0) >> 2)  |
-                    (((r->blue >> PNGK) & 0xc0) >> 4)  |
-                    (((r->blue >> PNGK) & 0xc0) >> 6)) * PNGM;
+                   ((((((size_t) r->blue) >> PNGK) & 0xc0)     )  |
+                    (((((size_t) r->blue) >> PNGK) & 0xc0) >> 2)  |
+                    (((((size_t) r->blue) >> PNGK) & 0xc0) >> 4)  |
+                    (((((size_t) r->blue) >> PNGK) & 0xc0) >> 6)) * PNGM;
               r++;
             }
     
@@ -7565,18 +7565,18 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
           for (i=0; i<image_colors; i++)
           {
               image->colormap[i].red=
-                   ((((image->colormap[i].red >> PNGK) & 0xe0)     )  |
-                    (((image->colormap[i].red >> PNGK) & 0xe0) >> 3)  |
-                    (((image->colormap[i].red >> PNGK) & 0xc0) >> 6)) * PNGM;
+                   ((((((size_t) image->colormap[i].red) >> PNGK) & 0xe0)     )  |
+                    (((((size_t) image->colormap[i].red) >> PNGK) & 0xe0) >> 3)  |
+                    (((((size_t) image->colormap[i].red) >> PNGK) & 0xc0) >> 6)) * PNGM;
               image->colormap[i].green=
-                   ((((image->colormap[i].green >> PNGK) & 0xe0)     )  |
-                    (((image->colormap[i].green >> PNGK) & 0xe0) >> 3)  |
-                    (((image->colormap[i].green >> PNGK) & 0xc0) >> 6)) * PNGM;
+                   ((((((size_t) image->colormap[i].green) >> PNGK) & 0xe0)     )  |
+                    (((((size_t) image->colormap[i].green) >> PNGK) & 0xe0) >> 3)  |
+                    (((((size_t) image->colormap[i].green) >> PNGK) & 0xc0) >> 6)) * PNGM;
               image->colormap[i].blue=
-                   ((((image->colormap[i].blue >> PNGK) & 0xc0)     )  |
-                    (((image->colormap[i].blue >> PNGK) & 0xc0) >> 2)  |
-                    (((image->colormap[i].blue >> PNGK) & 0xc0) >> 4)  |
-                    (((image->colormap[i].blue >> PNGK) & 0xc0) >> 6)) * PNGM;
+                   ((((((size_t) image->colormap[i].blue) >> PNGK) & 0xc0)     )  |
+                    (((((size_t) image->colormap[i].blue) >> PNGK) & 0xc0) >> 2)  |
+                    (((((size_t) image->colormap[i].blue) >> PNGK) & 0xc0) >> 4)  |
+                    (((((size_t) image->colormap[i].blue) >> PNGK) & 0xc0) >> 6)) * PNGM;
           }
       }
       continue;
index 7b7fefa72d9e67321334278ce7cd37a7afb5cd14..ac8b1eead459e53ea97095fc9eace571c9c5e5da 100644 (file)
@@ -1421,9 +1421,6 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
     offsets=(MagickOffsetType *) RelinquishMagickMemory(offsets);
   if (image->colorspace == CMYKColorspace)
     (void) NegateImage(image,MagickFalse);
-  if ((number_layers == 1) && (image->next != (Image *) NULL) &&
-      (image->matte != MagickFalse))
-    DeleteImageFromList(&image);
   (void) CloseBlob(image);
   return(GetFirstImageInList(image));
 }