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