Annotation of embedaddon/php/ext/gd/tests/imagerectangle_basic.phpt, revision 1.1.1.1

1.1       misho       1: --TEST-- 
                      2: Testing imagerectangle() of GD library 
                      3: --CREDITS-- 
                      4: Ivan Rosolen <contato [at] ivanrosolen [dot] com> 
                      5: #testfest PHPSP on 2009-06-30
                      6: --SKIPIF-- 
                      7: <?php  
                      8: if ( ! extension_loaded('gd') ) die( 'skip GD not present; skipping test' ); 
                      9: ?> 
                     10: --FILE--
                     11: <?php
                     12: // Create a image 
                     13: $image = imagecreatetruecolor( 100, 100 ); 
                     14: 
                     15: // Draw a rectangle
                     16: imagerectangle( $image, 0, 0, 50, 50, imagecolorallocate($image, 255, 255, 255) );
                     17: 
                     18: ob_start(); 
                     19: imagepng( $image, null, 9 ); 
                     20: $img = ob_get_contents(); 
                     21: ob_end_clean();
                     22: 
                     23: echo md5(base64_encode($img));
                     24: 
                     25: ?> 
                     26: --EXPECT-- 
                     27: 282aaecfdd50091821d63093d9bb1bb9

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>