2003-06-12 19:31:44 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #24155 (gdImageRotate270 rotation problem).
|
|
|
|
--SKIPIF--
|
2007-06-02 15:35:34 +00:00
|
|
|
<?php
|
|
|
|
if (!extension_loaded('gd')) {
|
2003-06-12 19:31:44 +00:00
|
|
|
die("skip gd extension not available\n");
|
|
|
|
}
|
2007-06-02 15:35:34 +00:00
|
|
|
if (!function_exists("imagerotate")) die("skip requires bundled GD library\n");
|
2003-06-12 19:31:44 +00:00
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2004-04-08 08:39:41 +00:00
|
|
|
$dest = dirname(realpath(__FILE__)) . '/bug24155.png';
|
2003-06-12 19:31:44 +00:00
|
|
|
@unlink($dest);
|
|
|
|
|
|
|
|
$im = imagecreatetruecolor(30, 50);
|
2007-06-02 15:35:34 +00:00
|
|
|
imagefill($im, 0, 0, (16777215 - 255));
|
2003-06-12 19:31:44 +00:00
|
|
|
$im = imagerotate($im, 270, 255);
|
|
|
|
imagepng($im, $dest);
|
|
|
|
|
2005-04-25 11:36:24 +00:00
|
|
|
$im2 = imagecreatefrompng($dest);
|
|
|
|
|
|
|
|
// Uniform fill + n x 90degrees rotation , the color value does not change
|
|
|
|
$col = imagecolorat($im2, 20, 20);
|
|
|
|
// 16777215 - 255 = 16776960
|
|
|
|
echo "$col\n";
|
|
|
|
|
2003-06-12 19:31:44 +00:00
|
|
|
@unlink($dest);
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
2005-04-25 11:36:24 +00:00
|
|
|
16776960
|