summaryrefslogtreecommitdiff
path: root/ext/gd/tests/imagefilledellipse_basic.phpt
blob: a1a578ad43f2f49bd4384606499d03daf684e12a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Testing imagefilledellipse() of GD library
--SKIPIF--
<?php 
if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php

$image = imagecreatetruecolor(100, 100);

$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);

//create an ellipse and fill it with white color    
imagefilledellipse($image, 50, 50, 40, 30, $white);

ob_start();
imagepng($image);
$img = ob_get_contents();
ob_end_clean();

echo md5(base64_encode($img));
?>
--EXPECT--
9ba540bba1b78c9f08efaa6fa0afd93b