PHP function imagescale()
Availability in versions: PHP 5.5.0
Rescales (resizes) the image to the given width and height.
Parameters
| Parameter | Data type | Default value | Note |
|---|---|---|---|
$image |
resource |
not | The source of the image (data type resource) that you get by one of the functions to create or load an image, such as imagecreatetruecolor(). |
$new_width |
int |
not | New width. |
$new_height |
int |
-1 |
New height. |
$mode |
int |
IMG_BILINEAR_FIXED |
Return values
resource or false.
The function returns the modified image as a resource data type. If an error occurs, it returns false.
Other resources
[Official imagescale function documentation](- imagescale() function)