Changeset 3288 for libcaca


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

merge alpha fix from svn://svn.zoy.org/libcaca/libcaca/trunk/caca-php/examples/export.php@3287 into examples/www/export.php

File:
1 edited

Legend:

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

    r3282 r3288  
    2222
    2323$pixels = imagecreatetruecolor(256, 256);
     24imagealphablending($pixels, false);
     25imagesavealpha($pixels, true);
    2426
    2527$exports = caca_get_export_list();
     
    126128                        $g = (255 - $y + $x) / 2;
    127129                        $b = $y * (255 - $x) / 256;
    128                         imagesetpixel($pixels, $x, $y, imagecolorallocate($pixels, $r, $g, $b));
     130                        imagesetpixel($pixels, $x, $y, imagecolorallocatealpha($pixels, $r, $g, $b, 127));
    129131                }
    130132        }
Note: See TracChangeset for help on using the changeset viewer.