$im = imagecreatetruecolor(400, 300);
$c_black = imageColorAllocate($im, 0,0,0);
$c_green = imageColorAllocate($im, 46,204,64);
imageellipse($im, 200, 150, 100, 100, $c_green);
imagewebp($im, '/tmp/image.webp');
imagecreatetruecolor
- creates true color lib:GD image object with specified width & heightimageColorAllocate
- creates color object to later use in imageimageellipse
- creates ellipse with specified coordinates, radius and border colorimagewebp
- saves givengd
image inwebp
format to the specified path/tmp/image.webp
- path to save image to
group: save_formats