imagecreatefromstring_gif.phpt 445 B

1234567891011121314151617181920
  1. --TEST--
  2. imagecreatefromstring() - GIF format
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('gd')) die('skip ext/gd required');
  6. if (!(imagetypes() & IMG_GIF)) die('skip GIF support required');
  7. ?>
  8. --FILE--
  9. <?php
  10. // create an image from a GIF string representation
  11. $im = imagecreatefromstring(file_get_contents(__DIR__ . '/imagecreatefromstring.gif'));
  12. var_dump(imagesx($im));
  13. var_dump(imagesy($im));
  14. ?>
  15. ===DONE===
  16. --EXPECT--
  17. int(10)
  18. int(10)
  19. ===DONE===