OSDN Git Service

* Using a small tree-depth of 4.
authorAtsushi Konno <atkonn@gmail.com>
Thu, 4 Aug 2011 12:38:26 +0000 (21:38 +0900)
committerAtsushi Konno <atkonn@gmail.com>
Thu, 4 Aug 2011 12:38:26 +0000 (21:38 +0900)
    Because MagickQuantizeImage() was very slow.
    http://sourceforge.jp/ticket/browse.php?group_id=1608&tid=25892

src/chxj_img_conv_format.c

index a678bb6..db7fa06 100644 (file)
@@ -1428,7 +1428,7 @@ s_fixup_color(MagickWand *magick_wand, request_rec *r, device_table *spec, img_c
     if (MagickQuantizeImage(magick_wand,
                            spec->color,
                            RGBColorspace,
-                           0,
+                           4, /* tree depth of 4 */
                            1,
                            0) == MagickFalse) {
       EXIT_MAGICK_ERROR();
@@ -1444,7 +1444,7 @@ s_fixup_color(MagickWand *magick_wand, request_rec *r, device_table *spec, img_c
     if (MagickQuantizeImage(magick_wand,
                            spec->color,
                            GRAYColorspace,
-                           0,
+                           4, /* tree depth of 4 */
                            1,
                            0) == MagickFalse) {
       EXIT_MAGICK_ERROR();