Gen. partnerAlgotech

PHP function imagescale()

Rescales (resizes) the image to the given width and height.

|
February 16, 2020

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)

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.