imagescale() scales an image using the given interpolation algorithm.
An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
The width to scale the image to.
The height to scale the image to. If omitted or negative, the aspect ratio will be preserved.
You should always provide the height if using PHP 5.5.18 or earlier, or PHP 5.6.2 or earlier, as the aspect ratio calculation was incorrect.
One of IMG_NEAREST_NEIGHBOUR
, IMG_BILINEAR_FIXED
, IMG_BICUBIC
, IMG_BICUBIC_FIXED
or anything else (will use two pass).
Return the scaled image resource on success or FALSE
on failure.
The calculation of the height if new_height
was negative or omitted was fixed; prior to these versions, the aspect ratio was not maintained correctly.
Please login to continue.