PHP | imagesettile() Function Last Updated : 23 Aug, 2019 Comments Improve Suggest changes Like Article Like Report 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 functions, such as imagecreatetruecolor(). It is used to create size of image. $tile: This parameter is used to set the image resource as a tile. Return Value: This function returns True on success or False on failure. Below programs illustrate the imagesettile() function in PHP: Program 1: php <?php // Load a png file $image = imagecreatefrompng( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Create an image of 400x250 size $im = imagecreatetruecolor(500, 250); // Set the image tile imagesettile($im, $image); // Make the image repeat imagefilledrectangle($im, 0, 0, 450, 199, IMG_COLOR_TILED); // Output image to the browser header('Content-Type: image/png'); imagepng($im); imagedestroy($im); imagedestroy($image); ?> Output: Program 2: php <?php // Load a png file $image = imagecreatefrompng( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Create an image of 670x350 size $im = imagecreatetruecolor(670, 350); // Set the image tile imagesettile($im, $image); // Make the image repeat imagefilledrectangle($im, 0, 0, 670, 350, IMG_COLOR_TILED); // Output image to the browser header('Content-Type: image/png'); imagepng($im); imagedestroy($im); imagedestroy($image); ?> Output: Reference: http://php.net/manual/en/function.imagesettile.php Comment More infoAdvertise with us Next Article PHP | imagesettile() Function V vijay_raj Follow Improve Article Tags : Web Technologies PHP Image-Processing PHP-function Similar Reads PHP | imagesetstyle() function The imagesetstyle() function is an inbuilt function in PHP which is used to set the style to be used by all line drawing functions like imageline() or imagepolygon(). Syntax: bool imagesetstyle( resource $image, array $style ) Parameters:This function accepts two parameters as mentioned above and de 2 min read PHP | imagesetpixel() Function The imagesetpixel() function is an inbuilt function in PHP which is used to draw a pixel at the specified coordinate.Syntax:Â bool imagesetpixel( resource $image, int $x, int $y, int $color ) Parameters: This function accept four parameters as mentioned above and described below:Â $image: It specifies 2 min read PHP | imagesetthickness() Function The imagesetthickness() function is an inbuilt function in PHP which is used to set the thickness for line drawing. Syntax: bool imagesetthickness( $image, $thickness ) Parameters: This function accepts two parameters as mentioned above and described below: $image: It is returned by one of the image 2 min read PHP | imagecreate() Function The imagecreate() function is an inbuilt function in PHP which is used to create a new image. This function returns the blank image of given size. In general imagecreatetruecolor() function is used instead of imagecreate() function because imagecreatetruecolor() function creates high quality images. 2 min read PHP | imagestring() Function The imagestring() function is an inbuilt function in PHP which is used to draw the string horizontally. This function draws the string at given position. Syntax: bool imagestring( $image, $font, $x, $y, $string, $color ) Parameters: This function accepts six parameters as mentioned above and describ 2 min read PHP | imagerectangle() Function The imagerectangle() function is an inbuilt function in PHP which is used to draw the rectangle. Syntax: bool imagerectangle( $image, $x1, $y1, $x2, $y2, $color ) Parameters: This function accepts six parameters as mentioned above and described below: $image: It is returned by one of the image creat 2 min read PHP | getimagesize() Function The getimagesize() function in PHP is an inbuilt function which is used to get the size of an image. This function accepts the filename as a parameter and determines the image size and returns the dimensions with the file type and height/width of image. Syntax: array getimagesize( $filename, $image_ 2 min read PHP | imagesy() Function The imagesy() function is an inbuilt function in PHP which is used to return the height of the given image. Syntax: int imagesy( $image ) Parameters: This function accepts single parameters $image which is mandatory. This $image variable store the image created by imagecreatetruecolor() image creati 1 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 | imagetypes() Function The imagetypes() function is an inbuilt function in PHP which is used to return the image types supported by the PHP inbuilt installed library. Syntax: int imagetypes( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the bit-field corresponding to t 1 min read Like