Andy Blyler wrote:

> Anyone now a quick and easy way to shrink a picture to about 1/3 of its
> origonal size so that it can be indexed?

I wrote the two little scripts attached last year. They were both quick
convenience jobs and are not very nicely written (subroutineless beasts!),
but they do the job.

But what do they do?

You will need Image::Magick installed.

The first script, THUMBS.BAT (they're encapsulated in DOS command files so
that you can just put them somewhere on your PATH) reads all images in the
current directory (or rather those that Image::Magick can read) and
generates a thumbnail GIF image in a subdirectory called 'THUMBS' for each.
The thumbnail image consists of the original image resized to fit in an
80x80 space and with a one-pixel black border around it inside a white frame
which states the filename of the image in the Verdana font. This behaviour
can easily be tweaked, often just by changing the variables set at the top
of the script.

The other, CONTACTS.BAT create the thumbnails as above, but writes them as a
series of 'contact sheet' images in a subdirectory called 'CONTACTS'. For
each sheet, an HTML file is created in the current directory with a name of
the form 'SHEETnnn.HTM'. These HTML files provide a client-side imagemap to
link the images in the contact sheet to the full size images.

In both scripts, I didn't bother to obtain the location of the Windows fonts
directory from the registry, so you may have to edit the line that
identifies the font file to use, which currently reads:

    $fontfile='c:/windows/fonts/verdana.ttf'; # Font to use for filename

There are lots of other things you can adjust in the block of variables at
the top of each script.

As I say, these were quick hacks I wrote one afternoon in November for
one-off use. They should get you started, but not that they are provided
without warranty or any obligation on my part!

Regards, Jon.

Thumbs.bat

Contacts.bat

Reply via email to