1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| <?php
$imgname='test.png';
//$im1 = imagecreatefrompng($imgname);
$img = imagecreatefrompng($imgname);
$col_ellipse = imagecolorallocate($img, 255, 0, 0);
$border = imagecolorallocate($img, 0, 0, 0);
$textcolor = imagecolorallocate($img, 0, 255, 255);
if(isset($_GET['X'])&&isset($_GET['Y'])&&isset($_GET['COLOR'])){
$x=$_GET['X'];
$y=$_GET['Y'];
$color=explode(",",$_GET['COLOR']);
$fill = imagecolorallocate($img, $color[0], $color[1],$color[2]);
imagefilltoborder($img, $x, $y, $border, $fill);
}
header('Content-Type: image/png');
imagepng($img);
?> |
Partager