'sorry - old question again: imagecropauto() not working
I have some simple code:
$original_image = imagecreatefromjpeg($image_path);
$cropped_image =imagecropauto($original_image , IMG_CROP_THRESHOLD, .5, 16777215);
imagejpeg($cropped_image, "$destination.cropped.jpg",90);
but this code does not give the desired result. I actually expect that from my $original_image (jpg) the white border will be removed automatically.
This is the Input Image. historical Image
Whatever parameters I choose, imagecropauto() always returns the original image and not a cropped image.
Where else can the cause be?
PHP Version 7.3.7 + GD 2.1.0 compatible
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
