bug60160.phpt 522 B

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