Answer the question
In order to leave comments, you need to log in
Crop a single color background with ImageMagick
Good afternoon. Tell me which way to dig to solve this problem:
If the pictures are like this - www.ogo1.ru/upload/resize/09/09378da0514c84198a2f87eafbf34483_600x600.jpg
I would like to crop the white background to the borders of the object with one imagemagick. I know that it is possible, but Google still refuses to reveal the secret to me.
UPD: Answer found:
convert test.jpg -fuzz 5% -trim result.jpg
Thanks to the user
Answer the question
In order to leave comments, you need to log in
PHP
$image = new Imagick($img_location);
$image->trimImage(0);
$image->writeImages($img_location, true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question