imagebmp_basic.phpt 478 B

1234567891011121314151617181920212223
  1. --TEST--
  2. imagebmp() - basic functionality
  3. --EXTENSIONS--
  4. gd
  5. --SKIPIF--
  6. <?php
  7. if (!(imagetypes() & IMG_BMP)) die('skip BMP support required');
  8. ?>
  9. --FILE--
  10. <?php
  11. // create an image
  12. $im = imagecreate(100, 100);
  13. imagecolorallocate($im, 0, 0, 0);
  14. $white = imagecolorallocate($im, 255, 255, 255);
  15. imageline($im, 10,10, 89,89, $white);
  16. // write the md5 hash of its BMP representation
  17. ob_start();
  18. imagebmp($im);
  19. echo md5(ob_get_clean());
  20. ?>
  21. --EXPECT--
  22. d49124076771822b09fa72e168c0de56