PHP | imageellipse() Function Last Updated : 25 Jul, 2018 Comments Improve Suggest changes Like Article Like Report The imageellipse() function is an inbuilt function in PHP which is used to draw an ellipse. This function returns TRUE on success or FALSE on failure. Syntax: bool imageellipse( $image, $cx, $cy, $width, $height, $color ) Parameters: This function accepts six parameters as mentioned above and described below: $image: It is returned by one of the image creation functions, such as imagecreatetruecolor(). It is used to create size of image. $cx: x-coordinate of the center. $cy: y-coordinate of the center. $width: The ellipse width. $height: The ellipse height. $color: It sets the color of ellipse. A color identifier created by imagecolorallocate() function. Return Value: It returns TRUE on success or FALSE on failure. Below programs illustrate the imageellipse() function in PHP: Program 1: php <?php // It create the size of image or blank image. $image_size = imagecreatetruecolor(500, 300); // Set the background color of image. $background_color = imagecolorallocate($image_size, 255, 255, 255); // Fill background with above selected color. imagefill($image_size, 0, 0, $background_color); // set color of ellipse. $ellipse_color = imagecolorallocate($image_size, 0, 0, 0); // Function to draw the ellipse. imageellipse($image_size, 250, 150, 400, 250, $ellipse_color); // Output the image. header("Content-type: image/png"); imagepng($image_size); ?> Output: Program 2: php <?php // It create the size of image or blank image. $image = imagecreatetruecolor(300, 500); // Set the background color of image. $bg = imagecolorallocate($image, 0, 102, 0); // Fill background with above selected color. imagefill($image, 0, 0, $bg); // set color of ellipse. $col_ellipse = imagecolorallocate($image, 255, 255, 255); // Function to draw the ellipse. imageellipse($image, 150, 250, 250, 400, $col_ellipse); // Output the image. header("Content-type: image/png"); imagepng($image); ?> Output: Reference: http://php.net/manual/en/function.imageellipse.php Comment More infoAdvertise with us Next Article PHP | imageellipse() Function V Vishal_Khoda Follow Improve Article Tags : Misc Web Technologies PHP PHP-function Practice Tags : Misc Similar Reads PHP | imagefilledellipse() Function The imagefilledellipse() function is an inbuilt function in PHP which is used to draw the filled ellipse. It draws the ellipse with specified center coordinate. Syntax: bool imagefilledellipse( $image, $cx, $cy, $width, $height, $color ) Parameters: This function accepts six parameters as mentioned 2 min read PHP | imageflip() Function The imageflip() function is an inbuilt function in PHP which is used to Flip an image horizontally, vertically or both horizontally and vertically using the given mode. Syntax: bool imageflip( $image, $mode ) Parameters: This function accepts two parameters as mentioned above and described below: $i 2 min read PHP | imagegetclip() Function The ImagickDraw::imagegetclip() function is an inbuilt function in PHP which is used to get the current clipping rectangle, i.e. the area beyond the no of pixels will be drawn. Default clipping area is the whole image which can be customized using imagesetclip() function. Syntax: array ImagickDraw:: 1 min read PHP | imagesetclip() function The imagesetclip() function is an inbuilt function in PHP which is used to set the current clipping rectangle, i.e. the area beyond which no pixels will be drawn. Syntax: bool imagesetclip( resource $im, int $x1, int $y1, int $x2, int $y2 ) Parameters:This function accepts five parameters as mention 2 min read PHP | imagefill() Function The imagefill() function is an inbuilt function in PHP which is used to fill the image with the given color. This function performs a flood fill starting at the given coordinate (top left is 0, 0) with the given color in the image. Syntax: bool imagefill( $image, $x, $y, $color ) Parameters:This fun 2 min read PHP | imagejpeg() Function The imagejpeg() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, convert any other image type to JPEG and altering the quality of the image. Syntax: bool imagejpeg( resource $image, int $to, in 2 min read PHP | imagewebp() Function The imagewebp() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, convert any other image type to WebP and alter the quality of the image.Syntax:Â bool imagewebp( resource $image, int $to, int $q 2 min read PHP | imagesettile() Function The imagesettile() function is an inbuilt function in PHP which is used to set the tile image for filling the area. Syntax: bool imagesettile( $image, $tile ) Parameters: This function accepts two parameters as mentioned above and described below: $image: It is returned by one of the image creation 2 min read PHP | imagesx() Function The imagesx() function is an inbuilt function in PHP which is used to return the width of the given image. Syntax: int imagesx( $image ) Parameters: This function accepts single parameters $image which is mandatory. This $image variable can store the image created by imagecreatetruecolor() image cre 1 min read PHP | imagepng() Function The imagepng() function is an inbuilt function in PHP which is used to display image to browser or file. The main use of this function is to view an image in the browser, convert any other image type to PNG and applying filters to the image. Syntax: bool imagepng( resource $image, int $to, int $qual 2 min read Like