imagecopymerge_basic.phpt 729 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Testing imagecopymerge() of GD library
  3. --CREDITS--
  4. Cleston Viel Vieira de Sousa <cleston [dot] vs [at] gmail [dot] com>
  5. #testfest PHPSP on 2009-06-20
  6. --SKIPIF--
  7. <?php
  8. if (!extension_loaded("gd")) die("skip GD not present");
  9. ?>
  10. --FILE--
  11. <?php
  12. $des = imagecreate(120, 120);
  13. $src = imagecreate(100, 100);
  14. imagecolorallocate($des, 50, 50, 200);
  15. $colorTXT_des = imagecolorallocate($des, 255, 255, 255);
  16. imagecolorallocate($src, 255, 255, 255);
  17. $colorTXT_src = imagecolorallocate($src, 0, 255, 255);
  18. imagestring($src, 1, 5, 5, "A Simple Text", $colorTXT_src);
  19. imagestring($des, 1, 5, 5, "Another Simple Text", $colorTXT_des);
  20. var_dump(imagecopymerge($des, $src, 20, 20, 0, 0, 50, 50, 75));
  21. ?>
  22. --EXPECTF--
  23. bool(true)