1--TEST-- 2Bug #24155 (gdImageRotate270 rotation problem). 3--EXTENSIONS-- 4gd 5--SKIPIF-- 6<?php 7 if (!(imagetypes() & IMG_PNG)) { 8 die("skip No PNG support"); 9 } 10?> 11--FILE-- 12<?php 13 $dest = dirname(realpath(__FILE__)) . '/bug24155.png'; 14 @unlink($dest); 15 16 $im = imagecreatetruecolor(30, 50); 17 imagefill($im, 0, 0, (16777215 - 255)); 18 $im = imagerotate($im, 270, 255); 19 imagepng($im, $dest); 20 21 $im2 = imagecreatefrompng($dest); 22 23 // Uniform fill + n x 90degrees rotation , the color value does not change 24 $col = imagecolorat($im2, 20, 20); 25 // 16777215 - 255 = 16776960 26 echo "$col\n"; 27 28 @unlink($dest); 29?> 30--EXPECT-- 3116776960 32