imagecreatefromstring_png.phpt 383 B

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