From: Tony Cook Date: Tue, 31 Jul 2007 14:45:31 +0000 (+0000) Subject: - transparency is now enabled by default when writing GIF images X-Git-Tag: Imager-0.60~19 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/d8a39ce0e14cdc77bf599130a08daa4ed7fe62ca - transparency is now enabled by default when writing GIF images http://rt.cpan.org/Ticket/Display.html?id=27615 --- diff --git a/Changes b/Changes index 29cf9621..4ef131af 100644 --- a/Changes +++ b/Changes @@ -40,6 +40,9 @@ Bug fixes: for which the driver hasn't been built in Imager. http://rt.cpan.org/Ticket/Display.html?id=27571 + - transparency is now enabled by default when writing GIF images + http://rt.cpan.org/Ticket/Display.html?id=27615 + Imager 0.59 - 14 June 2007 =========== diff --git a/Imager.xs b/Imager.xs index 80d65a60..f1268b02 100644 --- a/Imager.xs +++ b/Imager.xs @@ -2458,6 +2458,8 @@ i_writegif_gen(fd, ...) hv = (HV *)SvRV(ST(1)); memset(&quant, 0, sizeof(quant)); quant.mc_size = 256; + quant.transp = tr_threshold; + quant.tr_threshold = 127; handle_quant_opts(&quant, hv); img_count = items - 2; RETVAL = 1; @@ -2513,6 +2515,8 @@ i_writegif_callback(cb, maxbuffer,...) hv = (HV *)SvRV(ST(2)); memset(&quant, 0, sizeof(quant)); quant.mc_size = 256; + quant.transp = tr_threshold; + quant.tr_threshold = 127; handle_quant_opts(&quant, hv); img_count = items - 3; RETVAL = 1; @@ -2563,6 +2567,8 @@ i_writegif_wiol(ig, opts,...) hv = (HV *)SvRV(ST(1)); memset(&quant, 0, sizeof(quant)); quant.mc_size = 256; + quant.transp = tr_threshold; + quant.tr_threshold = 127; handle_quant_opts(&quant, hv); img_count = items - 2; RETVAL = 1; diff --git a/TODO b/TODO index d19a7b16..1ec71b95 100644 --- a/TODO +++ b/TODO @@ -18,12 +18,12 @@ repeated text in Imager::Files (#27589) (done) error message when loading an unsupported font format is confusing (#27571) (done) +enable transparency by default for gif (#27615) (done) + new color counting code (#28142) Imager doesn't load on Windows 98 (#27653) -enable transparency by default for gif (#27615) - sample: scaling an animated gif (#27591) For 0.58: