]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/332
authorCristy <urban-warrior@imagemagick.org>
Thu, 29 Dec 2016 01:49:47 +0000 (20:49 -0500)
committerCristy <urban-warrior@imagemagick.org>
Thu, 29 Dec 2016 01:49:47 +0000 (20:49 -0500)
ChangeLog
MagickCore/attribute.c
MagickCore/colormap.c

index 04c557f04e70471f5389cd9a62e548a56e3846b0..a686932dc5ab080a0d6290bf218427e052428e7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2016-12-26  7.0.4-1 Cristy  <quetzlzacatenango@image...>
   * Initialize draw_info alpha member to OpaqueAlpha.
+  * Monochrome images no longer have inverted colors (reference
+    https://github.com/ImageMagick/ImageMagick/issues/332).
 
 2016-12-18  7.0.4-0 Cristy  <quetzlzacatenango@image...>
   * Release ImageMagick version 7.0.4-0, GIT revision 19221:d5e8abc:20161218.
index e9ca7de7580a1949a6ebbc6a9fd481e34382e26d..07d29e3111f3bdf0a266f591548bf13a0e15f5ee 100644 (file)
@@ -1264,7 +1264,6 @@ MagickExport MagickBooleanType SetImageType(Image *image,const ImageType type,
           status=QuantizeImage(quantize_info,image,exception);
           quantize_info=DestroyQuantizeInfo(quantize_info);
         }
-      status=AcquireImageColormap(image,2,exception);
       image->alpha_trait=UndefinedPixelTrait;
       break;
     }
index 1cdde9a56c5ab65141e16cd0202c16066386ced4..893c655928d732be790f2c8737c56f3a318fbb68 100644 (file)
@@ -116,11 +116,11 @@ MagickExport MagickBooleanType AcquireImageColormap(Image *image,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   image->colors=MagickMax(colors,1);
   if (image->colormap == (PixelInfo *) NULL)
-    image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors,
+    image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1,
       sizeof(*image->colormap));
   else
     image->colormap=(PixelInfo *) ResizeQuantumMemory(image->colormap,
-      image->colors,sizeof(*image->colormap));
+      image->colors+1,sizeof(*image->colormap));
   if (image->colormap == (PixelInfo *) NULL)
     {
       image->colors=0;