Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone,

How do you use Perl Image::Magick to crop the whitespace off an image (a signature image in jpg)? I have googled but can't find anything directly helpful.

Thanks in advance.

  • Comment on How to use Image::Magick to crop white space around a signature image?

Replies are listed 'Best First'.
Re: How to use Image::Magick to crop white space around a signature image?
by poj (Abbot) on Apr 29, 2018 at 14:41 UTC
    #!/usr/bin/perl use strict; use Image::Magick; my $p = new Image::Magick; $p->Read("image.jpg"); $p->Trim(); $p->Write("trimmed.jpg");
    poj
      That saved my day!
      !
      Thank you so much :)