[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cropping a large collection of .PNG screenshots

On Wed, 9 Apr 2014 03:03:14 -0700
"Kevin O'Gorman" <kogorman@gmail.com> wrote:

> I have a few hundred screen shots I want to put on a web page, but
> they are all full-screen and I want to crop to the real contents.
> This is an identical region in all cases.  So I want to script it.
> So, 2 questions:
> A) What's the best tool for the job?  Gimp, irfanview, or something
> else? B) Is there a script already in existence where I can just
> change the crop rectangle?  I really don't want to learn a new
> language for a one-time job.

I haven't done it, but I'm pretty sure the convert program from
ImageMagicK does exactly what you want. See:

man convert | grep -A5 crop

As far as a script, all I can recommend is a loop that backs up
the original to a new name, converts and renames the converted, so you
can start it again if you get only half way through for some reason.

Or, you can just redirect ls into a file, use Vim to convert and rename
each file individually.



Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance

Reply to: