1--TEST-- 2Testing imagefilltoborder() of GD library 3--CREDITS-- 4Ivan Rosolen <contato [at] ivanrosolen [dot] com> 5#testfest PHPSP on 2009-06-30 6--SKIPIF-- 7<?php 8if (!extension_loaded("gd")) die("skip GD not present"); 9?> 10--FILE-- 11<?php 12// Create a image 13$image = imagecreatetruecolor( 100, 100 ); 14 15// Draw a rectangle 16imagefilledrectangle( $image, 0, 0, 100, 100, imagecolorallocate( $image, 255, 255, 255 ) ); 17 18// Draw an ellipse to fill with a black border 19imageellipse( $image, 50, 50, 50, 50, imagecolorallocate( $image, 0, 0, 0 ) ); 20 21// Fill border 22imagefilltoborder( $image, 50, 50, imagecolorallocate( $image, 0, 0, 0 ), imagecolorallocate( $image, 255, 0, 0 ) ); 23 24ob_start(); 25imagepng( $image, null, 9 ); 26$img = ob_get_contents(); 27ob_end_clean(); 28 29echo md5(base64_encode($img)); 30 31?> 32--EXPECT-- 33847ec236f1c4d14c465306c8408550fc 34