]> git.imager.perl.org - imager.git/commitdiff
[rt.cpan.org #64785] GIF encoding is very slower on Imager 0.78+
authorTony Cook <tony@develop-help.com>
Sat, 15 Jan 2011 02:26:49 +0000 (13:26 +1100)
committerTony Cook <tony@develop-help.com>
Sat, 15 Jan 2011 02:26:49 +0000 (13:26 +1100)
The various backward compatibility hacks in Imager.pm's gif handling
were removed with the switch to a separate module, but this means that
the original default of using a median cut palette builder was removed.

The addi algorithm is slow enough that I'd prefer that people have to
select it manually, so change the global quant default to median cut.

Changes
Imager.xs

diff --git a/Changes b/Changes
index 9aeaf4fffb4fe880e3304ce9617f8808a98aac8d..88e6634835a18e8505226f96453d20b37379481a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -12,6 +12,9 @@ Bug fixes:
  - Imager::Color::Float now translates "#FFFFFF" to white instead of
    just a little darker.
 
+ - make the default color map build algorithm "mediancut".
+   https://rt.cpan.org/Ticket/Display.html?id=64785
+
 Imager 0.79 - 10 Dec 2010
 ===========
 
index 4a82c12f23cb4f63cca2eae80d50e20397892f8e..d1512c0c85de7a539a31cda0e15f5f7e5cc66443 100644 (file)
--- a/Imager.xs
+++ b/Imager.xs
@@ -641,7 +641,7 @@ ip_handle_quant_opts(pTHX_ i_quantize *quant, HV *hv)
       }
     }
   }
-  quant->make_colors = mc_addi;
+  quant->make_colors = mc_median_cut;
   sv = hv_fetch(hv, "make_colors", 11, 0);
   if (sv && *sv && (str = SvPV(*sv, len))) {
     quant->make_colors =