]> git.imager.perl.org - imager.git/commitdiff
- transparency is now enabled by default when writing GIF images
authorTony Cook <tony@develop=help.com>
Tue, 31 Jul 2007 14:45:31 +0000 (14:45 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 31 Jul 2007 14:45:31 +0000 (14:45 +0000)
   http://rt.cpan.org/Ticket/Display.html?id=27615

Changes
Imager.xs
TODO

diff --git a/Changes b/Changes
index 29cf96216e05ef86e3eb9a0d73e5db82abf0a5e2..4ef131af394a0a66677f2828ca404e4703335365 100644 (file)
--- 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
 
    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
 ===========
 
 Imager 0.59 - 14 June 2007
 ===========
 
index 80d65a6039f2b8110e7194ddb160d1d11840087d..f1268b02592a91b9914af940bad25158eae156f2 100644 (file)
--- 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;
        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;
        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;
        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;
        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;
        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;
        handle_quant_opts(&quant, hv);
        img_count = items - 2;
        RETVAL = 1;
diff --git a/TODO b/TODO
index d19a7b16310a0102185c7012cfaa7b86441f37d9..1ec71b954fb60d5ef09c19fc6634628a07edab25 100644 (file)
--- 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)
 
 
 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)
 
 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:
 sample: scaling an animated gif (#27591)
 
 For 0.58: