Re: Simple way to script thumbnails

At Tue, 11 Jan 2011 17:43:55 +0000 Richard Kettlewell <rjk@xxxxxxxxxxxxxxx> wrote:

Stan Bischof <stan@xxxxxxxxxxxxxxxxxx> writes:

From any web search looks like there's so many possibilities
that a quick note here seems more productive, so...

I would like to write simple script to take a directory full
of arbitrary graphics files ( gif, jpg, png, tiff, etc ) and
generate constant-pixel-height thumbnails of them all. What's
a simple, small tool that I can install and use for this?

I would really like small/simple rather than a huge beast like
gimp. And of course a CLI is needed. Something that will work
on vanilla linux box ( no kde or the like ) without need
for a GUI.

So- has anyone here actually done this? If so what tool(s)?

Imagemagick is easy enough to drive from the shell.

Hint: 'identify <some image>' will yield info about the image
(including its size [HxW]).
'convert <some image> -geometry HxW <thumnail image name>' will
generate the thumbnail of the specificed size. Both identify and
convert can be used in a shell script and neither are GUI programs.
Both are part of the Imagemagick package.

Robert Heller -- 978-544-6933 / heller@xxxxxxxxxxxx
Deepwoods Software --
() ascii ribbon campaign -- against html e-mail
/\ -- against proprietary attachments


Relevant Pages

  • Re: What IDE are you using?
    ... MS VS VB is all oriented to creating Windows GUI programs, but the task at hand was not to produce a GUI program rather a script. ... your choice of IDE and your method of building does not easily fit into an automated way of building large quantities of software which is how it usually, eventually needs to happen in any large organization. ... Outlook and Exchange. ...
  • Re: pop-forum Re: poplog-dev A look at Poplog on the Macintosh
    ... with the poplink command. ... When trying to make pglink produce a 'sh' rather than a 'csh' shell ... script for linking and when trying to make it put unexpanded environment ... using the shell script pglibr, ...
  • Files appear to be cross linked
    ... script requires a number of standard environment variables to be set ... so it calls a second shell script to set these at the session level, ... control should return to the first shell script, ... that the script executes to the last line prior to the displaying of ...
  • Re: [PHP] Catch STDERR
    ... into your PHP script? ... Or do you just need STDOUT in one variable, and STDERR in another, ... Another option is to try to write a .sh shell script to get what you ...
  • Re: basic questions
    ... Setting a script that runs at 3:00 ... Set chron to run that shell script. ... Debug the GUI application with the REPL. ... You start up the Web browser, then browse the Web, visit a hundred ...