Changeset 3287 for libcaca/trunk


Ignore:
Timestamp:
Nov 5, 2008, 12:54:38 AM (11 years ago)
Author:
bsittler
Message:

use alpha in PNG export, since it is now required to get a correct PNG output image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/examples/export.php

    r3260 r3287  
    2727
    2828$pixels = imagecreatetruecolor(256, 256);
     29imagealphablending($pixels, false);
     30imagesavealpha($pixels, true);
    2931
    3032$exports = caca_get_export_list();
     
    7981                        $g = (255 - $y + $x) / 2;
    8082                        $b = $y * (255 - $x) / 256;
    81                         imagesetpixel($pixels, $x, $y, imagecolorallocate($pixels, $r, $g, $b));
     83                        imagesetpixel($pixels, $x, $y, imagecolorallocatealpha($pixels, $r, $g, $b, 127));
    8284                }
    8385        }
Note: See TracChangeset for help on using the changeset viewer.