bug43828.phpt 679 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #43828 (broken transparency of imagearc for truecolor in blendingmode)
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
  8. die("skip test requires GD 2.2.2 or higher");
  9. }
  10. ?>
  11. --FILE--
  12. <?php
  13. $im = imagecreatetruecolor(100,100);
  14. $transparent = imagecolorallocatealpha($im, 255, 255, 255, 80);
  15. imagefilledrectangle($im, 0,0, 99,99, $transparent);
  16. $color = imagecolorallocatealpha($im, 0, 255, 0, 100);
  17. imagefilledarc($im, 49, 49, 99,99, 0 , 360, $color, IMG_ARC_PIE);
  18. include_once __DIR__ . '/func.inc';
  19. test_image_equals_file(__DIR__ . '/bug43828.png', $im);
  20. imagedestroy($im);
  21. ?>
  22. --EXPECT--
  23. The images are equal.