Gen. partnerAlgotech

PHP function imagecropauto()

Crop an image automatically using one of the available modes

|
September 11, 2019

Availability in versions: PHP 5.5.0

Crop an image automatically using one of the available modes

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()}.
$mode int -1, One of IMG_CROP_* constants.
$threshold float .5, Used IMG_CROP_THRESHOLD mode.
$color int -1

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.