imagecreatefromstring_webp.phpt 450 B

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