]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 21 Jun 2012 13:35:15 +0000 (13:35 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 21 Jun 2012 13:35:15 +0000 (13:35 +0000)
coders/miff.c
coders/mpc.c
coders/png.c

index 5d7b5c99c81db0755e7bf5350df3982e1faaf6cf..30b4b4d91bd3c8793671befd20a4948c9295b6c3 100644 (file)
@@ -688,7 +688,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                       MagickFalse,options);
                     if (colorspace < 0)
                       break;
-                    image->colorspace=(ColorspaceType) colorspace;
+                    (void) SetImageColorspace(image,(ColorspaceType) colorspace,                      exception);
                     break;
                   }
                 if (LocaleCompare(keyword,"compression") == 0)
index 0b711227965d7ad4bbff00ced569a3fe006c28fd..429ce79b9d4b1efa714b241a823ec1c199bdae87 100644 (file)
@@ -388,7 +388,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                       MagickFalse,options);
                     if (colorspace < 0)
                       break;
-                    image->colorspace=(ColorspaceType) colorspace;
+                    (void) SetImageColorspace(image,(ColorspaceType) colorspace,                      exception);
                     break;
                   }
                 if (LocaleCompare(keyword,"compression") == 0)
index f3d83d1011209c203854689da7d7f2833c406538..bc9c4dfb93d73eaf2374968d527fbfc2222a0aa1 100644 (file)
@@ -2280,6 +2280,14 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
   image->depth=ping_bit_depth;
   image->depth=GetImageQuantumDepth(image,MagickFalse);
   image->interlace=ping_interlace_method != 0 ? PNGInterlace : NoInterlace;
+  if (((int) ping_color_type == PNG_COLOR_TYPE_GRAY) ||
+      ((int) ping_color_type == PNG_COLOR_TYPE_GRAY_ALPHA))
+    {
+      image->rendering_intent=UndefinedIntent;
+      image->gamma=1.000;
+      (void) ResetMagickMemory(&image->chromaticity,0,
+        sizeof(image->chromaticity));
+    }
   if (logging != MagickFalse)
     {
       (void) LogMagickEvent(CoderEvent,GetMagickModule(),