]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 25 Apr 2010 00:43:15 +0000 (00:43 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 25 Apr 2010 00:43:15 +0000 (00:43 +0000)
ChangeLog
coders/png.c
magick/quantize.c

index 814b0576c45414d71d1130261d17f7826bd2b3bc..37ca709c76beea2b72a154abbf03f2760f7d479a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2010-04-24.6.1-6 Cristy  <quetzlzacatenango@image...>
   * Do not declare timestruct under MinGW.
   * Respect -compose option for the montag utility (bug report by Anthony).
+  * A 256 column gradient produces a 256 color GIF image (bug report by
+    Anthony).
 
 2010-04-17  6.6.1-5 Cristy  <quetzlzacatenango@image...>
   * Only write one ICC profile to PSD image.
index ba68c35709345e3d0e9d1fd72657b0be84ec3b94..79a7274465ba170239299ffa22401b38ce38bd4b 100644 (file)
@@ -48,6 +48,7 @@
 #include "magick/cache.h"
 #include "magick/color.h"
 #include "magick/color-private.h"
+#include "magick/colormap.h"
 #include "magick/colorspace.h"
 #include "magick/constitute.h"
 #include "magick/enhance.h"
index 687bd8329793cc852fc7621b3c1d6109db7b0a68..6173d317158f802e00c920f02c6b33928924bacf 100644 (file)
@@ -2523,14 +2523,14 @@ MagickExport MagickBooleanType QuantizeImage(const QuantizeInfo *quantize_info,
     maximum_colors=MaxColormapSize;
   if (maximum_colors > MaxColormapSize)
     maximum_colors=MaxColormapSize;
+  if ((image->columns*image->rows) <= maximum_colors)
+    return(DirectToColormapImage(image,&image->exception));
   if ((IsGrayImage(image,&image->exception) != MagickFalse) &&
       (image->matte == MagickFalse))
     (void) SetGrayscaleImage(image);
   if ((image->storage_class == PseudoClass) &&
       (image->colors <= maximum_colors))
     return(MagickTrue);
-  if ((image->columns*image->rows) <= maximum_colors)
-    return(DirectToColormapImage(image,&image->exception));
   depth=quantize_info->tree_depth;
   if (depth == 0)
     {