Change language

PHP Imagesettile () function

|
Syntax:
bool imagesettile ($image, $tile)
Parameters: this function takes two parameters as above and described below:
  • $image:is returned by one of the image creation functions such as imagecreatetruecolor(). Used to create the size of the 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.The following programs illustrate the imagesettile() functionin PHP:Program 1:  
// Load the png file $image = imagecreatefrompng ( https://media.engineerforengineer.org/wp-content/uploads/engineerforengineer-9.png ) ;  
// Create a 400x250 image $im = imagecreatetruecolor (500, 250);  
// Set image tile imagesettile ( $im , $image );  
// Make the image repeated imagefilledrectangle-method/">rectangle ( $im , 0, 0, 450, 199, IMG_COLOR_TILED);  
// Output image to browser header ( ’Content-Type: image / png’ ); imagepng ( $im ); imagedestroy ( $im ); imagedestroy ( $image ); ?>
Output: Program 2:  
// Loading png file $image = imagecreatefrompng ( https: / /media.engineerforengineer.org/wp-content/uploads/engineerforengineer-9.png );  
// Create 670x350 image $im = imagecreatetruecolor (670, 350);  
// Set image tile imagesettile ( $im , $image );  
// Make the image repeated imagefilledrectangle-method/">rectangle ( $im , 0, 0, 670, 350, IMG_COLOR_TILED);  
// Output image to browser header ( ’Content-Type: image / png’ ); imagepng ( $im ); imagedestroy ( $im ); imagedestroy ( $image ); ?>
Output: Link: http://php.net/manual/en/function.imagesettile.php

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method