imgtrim – trim sides of an image
This command is useful for trimming images. Scans, user submitted content for site, etc.
You tell it what image, how much to cut from what side, and done.
From README…
INSTALLATION
perl Makefile.PL
make installNAME
imgtrim – Trim sides of IMAGE.USAGE
imgtrim [OPTION] IMAGE..-t number top
-b number bottom
-l number left
-r number right
-T number overall trim
-d debug
-h help
-v versionUSAGE EXAMPLES
Trim 100 pixels from top imgtrim -t 100 ./img.jpgTrim 210 pixels from bottom and 50 from top imgtrim -b 210 -t 50
./img.jpgTrim 50 pixels from all sides imgtrim -T 50 ./img.jpg
DESCRIPTION
I work off and on with scans of images clients send me. Sometimes they
need to be trimmed up on sides, for example. The images are sometimes
very large, and I don’t want to have to open 5MB jpeg files in gimp to
trim 100 pixels off the top. So with this command, I can simply say,
trim 100 pixels off top of this image.Wait, but.. you could do this in imagemagick’s mogrify and convert! you
say. Yes- this command uses convert in the background. But the thing is
tailored to trim- which has saved me a good deal of time.CAVEATS
Uses mogrify, alters original image.REQUIREMENTS
You will need a posix environment. You will need ImageMagick mogrify
installed.
- Download imgtrim from cpan
