Annotation of embedaddon/php/ext/gd/tests/imagelayereffect_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing imagelayereffect() of GD library
! 3: --CREDITS--
! 4: Rafael Dohms <rdohms [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: if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected');
! 10: ?>
! 11: --FILE--
! 12: <?php
! 13: $image = imagecreatetruecolor(180, 30);
! 14:
! 15: $layer = imagelayereffect($image, IMG_EFFECT_REPLACE);
! 16:
! 17: if ($layer){
! 18: ob_start();
! 19: imagepng($image, null, 9);
! 20: $img = ob_get_contents();
! 21: ob_end_clean();
! 22: }
! 23:
! 24: echo md5(base64_encode($img));
! 25: ?>
! 26: --EXPECT--
! 27: 5a8fe9864cbd20e5dbe730c77f30db95
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>