I am Trimming whitespace from my images using ImageMagick
. Everything is working great and successfully trimming. But now I want to leave an offset of about 30px and cut extra whitespace from images. I mean to say my current result is
Now you can see that above image is completely trimmed but I want some offset like
I want to leave 30px on every side and trimming remaining whitespace. I am trimming with Fuzz with following code
$image = new Imagick('capfile.jpg');
$image->trimImage(25000);
I don't want to add borders or crop. I just want to trim with offset of 30px to main image itself because many of my images also have some light background colors which is trimmed using Fuzz so adding borders is not an option.