1--TEST-- 2libgd bug 223 (gdImageRotateGeneric() does not properly interpolate) 3--EXTENSIONS-- 4gd 5--SKIPIF-- 6<?php 7if (!GD_BUNDLED) die("skip only for bundled libgd"); 8?> 9--FILE-- 10<?php 11require_once __DIR__ . "/func.inc"; 12 13$im = imagecreatetruecolor(64, 64); 14for ($j = 0; $j < 64; $j++) { 15 for ($i = 0; $i < 64; $i++) { 16 imagesetpixel($im, $i, $j, ($i % 2 || $j % 2) ? 0x000000 : 0xffffff); 17 } 18} 19 20imagesetinterpolation($im, IMG_BICUBIC); 21$im = imagerotate($im, 45, 0xff0000); 22 23test_image_equals_file(__DIR__ . "/gd223.png", $im); 24?> 25--EXPECT-- 26The images are equal. 27