Issue
How to draw a circle in (100px top and 100px left) of img using php ?
Image URL : image.jpg
I want to load the img then draw a circle on the orginal content of it
Before :
After :
Solution
Take a look at imagefilledellipse
// Create a image from file.
$image = imagecreatefromjpeg('imgname.jpg');
// choose a color for the ellipse
$ellipseColor = imagecolorallocate($image, 0, 0, 255);
// draw the blue ellipse
imagefilledellipse($image, 100, 100, 10, 10, $ellipseColor);
// Output the image.
header("Content-type: image/jpeg");
imagejpeg($image);
Answered By - CarlG Answer Checked By - Mary Flores (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.