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 Like