Gen. partnerAlgotech

PHP function imagecrop()

Crop an image using the given coordinates and size, x, y, width and height

|
September 11, 2019

Availability in versions: PHP 5.5.0

Crop an image using the given coordinates and size, x, y, width and height

Parameters

Parameter Data type Default value Note
$image resource An image resource, returned by one of the image creation functions, such as {@link https://www.php.net/manual/en/function.imagecreatetruecolor.php imagecreatetruecolor()}.
$rect array Array with keys "x", "y", "width" and "height".

Return values

resource

|bool Return cropped image resource on success or FALSE on failure.

Other resources

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.