bug22544.phpt 502 B

12345678910111213141516
  1. --TEST--
  2. Bug #22544 (TrueColor transparency in PNG images).
  3. --EXTENSIONS--
  4. gd
  5. --FILE--
  6. <?php
  7. $image = imageCreateTruecolor(640, 100);
  8. $transparent = imageColorAllocate($image, 0, 0, 0);
  9. $red = imageColorAllocate($image, 255, 50, 50);
  10. imageColorTransparent($image, $transparent);
  11. imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
  12. include_once __DIR__ . '/func.inc';
  13. test_image_equals_file(__DIR__ . '/bug22544.png', $image);
  14. ?>
  15. --EXPECT--
  16. The images are equal.