bug39366.phpt 498 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #39366 (imagerotate does not respect alpha with angles>45)
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (!function_exists("imagerotate")) die("skip requires bundled GD library\n");
  8. ?>
  9. --FILE--
  10. <?php
  11. $im = imagecreatetruecolor(10,10);
  12. imagealphablending($im, 0);
  13. imagefilledrectangle($im, 0,0, 8,8, 0x32FF0000);
  14. $rotate = imagerotate($im, 180, 0);
  15. imagecolortransparent($rotate,0);
  16. imagesavealpha($rotate, true);
  17. $c = imagecolorat($rotate,5,5);
  18. printf("%X\n", $c);
  19. ?>
  20. --EXPECT--
  21. 32FF0000