You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
711 B

  1. --TEST--
  2. Testing imageconvolution() of GD library
  3. --CREDITS--
  4. Guilherme Blanco <guilhermeblanco [at] hotmail [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. $image = imagecreatetruecolor(180, 30);
  13. // Writes the text and apply a gaussian blur on the image
  14. imagestring($image, 5, 10, 8, 'Gaussian Blur Text', 0x00ff00);
  15. $gaussian = array(
  16. array(1.0, 2.0, 1.0),
  17. array(2.0, 4.0, 2.0),
  18. array(1.0, 2.0, 1.0)
  19. );
  20. imageconvolution($image, $gaussian, 16, 0);
  21. ob_start();
  22. imagepng($image, null, 9);
  23. $img = ob_get_contents();
  24. ob_end_clean();
  25. echo md5(base64_encode($img));
  26. ?>
  27. --EXPECT--
  28. 594576a2a2a689447ffc07eb5a73f09b