1--TEST-- 2Bug #51671 (imagefill does not work correctly for small images) 3--SKIPIF-- 4<?php 5 if(!extension_loaded('gd')){ die('skip gd extension not available'); } 6?> 7--FILE-- 8<?php 9$w = 1; 10$h = 50; 11$im = imagecreatetruecolor($w, $h); 12$white = imagecolorallocate($im, 255, 255, 255); 13imagefill($im, 0, 0, $white); 14 15for ($iy = 0; $iy < $h; $iy++) { 16 if (($c = imagecolorat($im, 0, $iy)) != $white) { 17 printf("Failed, (0, $iy) is %X\n", $c); 18 } 19} 20 21echo "OK\n"; 22?> 23--EXPECTF-- 24OK 25