createfromgd2.phpt 559 B

1234567891011121314151617181920212223
  1. --TEST--
  2. imagecreatefromgd2
  3. --SKIPIF--
  4. <?php
  5. if (!function_exists('imagecreatefromgd2')) die("skip gd extension not available\n");
  6. ?>
  7. --FILE--
  8. <?php
  9. $file = dirname(__FILE__) . '/src.gd2';
  10. $im2 = imagecreatefromgd2($file);
  11. echo 'test create from gd2: ';
  12. echo imagecolorat($im2, 4,4) == 0xffffff ? 'ok' : 'failed';
  13. echo "\n";
  14. $im3 = imagecreatefromgd2part($file, 4,4, 2,2);
  15. echo 'test create from gd2 part: ';
  16. echo imagecolorat($im2, 4,4) == 0xffffff ? 'ok' : 'failed';
  17. echo "\n";
  18. ?>
  19. --EXPECT--
  20. test create from gd2: ok
  21. test create from gd2 part: ok