bug77943.phpt 612 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #77943 (imageantialias($image, false); does not work)
  3. --EXTENSIONS--
  4. gd
  5. --FILE--
  6. <?php
  7. require_once __DIR__ . '/func.inc';
  8. $width = 400;
  9. $height = 300;
  10. $im = imagecreatetruecolor($width, $height);
  11. $white = imagecolorallocate($im, 255, 255, 255);
  12. $blue = imagecolorallocate($im, 0, 0, 255);
  13. imageantialias($im, false);
  14. imagefilledrectangle($im, 0, 0, $width-1, $height-1, $white);
  15. imageline($im, 0, 0, $width, $height, $blue);
  16. imagesetthickness($im, 3);
  17. imageline($im, 10, 0, $width, $height-10, $blue);
  18. test_image_equals_file(__DIR__ . '/bug77943.png', $im);
  19. ?>
  20. --EXPECT--
  21. The images are equal.