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