bug51671.phpt 429 B

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