]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 2 Mar 2014 13:05:40 +0000 (13:05 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 2 Mar 2014 13:05:40 +0000 (13:05 +0000)
MagickCore/quantize.c

index 0e5f247388b209f0b216b7532fc8708728819f97..704deb8ab32c3542c3bff634b978bd5226043f52 100644 (file)
@@ -3132,7 +3132,7 @@ static void ReduceImageColors(const Image *image,CubeInfo *cube_info)
     span;
 
   cube_info->next_threshold=0.0;
-  if ((cube_info->colors > cube_info->maximum_colors) && (cube_info->depth > 3))
+  if (cube_info->colors > cube_info->maximum_colors)
     {
       MagickRealType
         *quantize_error;
@@ -3149,7 +3149,7 @@ static void ReduceImageColors(const Image *image,CubeInfo *cube_info)
           qsort(quantize_error,cube_info->nodes,sizeof(MagickRealType),
             MagickRealTypeCompare);
           cube_info->next_threshold=quantize_error[MagickMax(cube_info->nodes-
-            cube_info->maximum_colors,0)];
+            110*cube_info->maximum_colors/100,0)];
           quantize_error=(MagickRealType *) RelinquishMagickMemory(
             quantize_error);
         }