Image Batch Processing
...Akkana
These scripts make it easy to upload large numbers of images
(from a scanner or digital camera, for example) and turn them
into web pages. They run on Unix systems (other restrictions as noted)
though it might not be too hard to port them to other operating systems.
They're written in a motley collection of csh, perl and python.
You may freely use and modify these programs under the
GNU Public License.
Warning! These are not really set up as a nice usable package.
I'm under the impression that since there are a gazillion
packages to do this, nobody's actually going to want mine except
maybe as a learning tool or a starting point to write your own.
If you actually are trying to use these scripts and having trouble
figuring them out, please let me know. I'll be happy to (1) answer
any questions, (2) write some better documentation or (3) send you
the latest versions (the versions here may not always be the
latest-and-greatest and may have some bugs that I've fixed on
my local machine).
Here's a sample page.
You might also be interested in my pho image
viewer, which makes it easy to page through lots of images quickly
and decide which ones need to be rotated, deleted or copied.
Download the whole collection:
imagebatch-1.3.tar.gz.
It includes the following scripts:
- filestolower (csh)
- csh: Convert filenames to lower case -- Windows image processing
programs are forever converting my lower-case names to upper case.
- imgsize (Perl)
- Print the size of an image file.
Based on code adapted from the excellent
wwwis
program,
which is indispensable for setting width and height tags
in html pages.
- resizeall (python)
- Rescale images to a smaller size (can also make thumbnails).
Newly translated to python, this version uses Image Magick
by default (so it preserves EXIF information).
This script is useful for when you want to keep everything the same size
(no cropping) and good for scaling down big originals.
It requires the imgsize script.
This obsoletes the older csh scripts resizeall.csh and mkthumbnail.
- mkthumb (symbolic link to resizeall)
- If resizeall is called as "mkthumb", it will automatically put itself
in thumbnail mode, and (unless told otherwise) will generate drop
shadows.
- rotateall (csh)
- Rotate all the images, -left (default) or -right
(you can switch directions in midstream).
This one uses ImageMagick's convert instead of netpbm --
eventually I plan to convert all the others to use convert as well.
- tblimages (csh)
- Take a bunch of thumbnail images (assuming that full-sized
images are in the same directory) and make a web page
out of them.
- showpix.pl (perl)
- CGI: Display full-sized images one by one,
letting you step forward and backward,
and allowing a short description for each image.
(There seems to be no way to tell apache not to execute
this .pl file, even with a .htaccess, so I've removed the .pl.)
- mkpixlist (perl)
- Find images under the current directory and generate
a file suitable for using showpix.cgi.
- mkphplist (python)
- New:Find images under the current directory and generate
a file suitable for using showpix.php.
This is faster than the Perl CGI, and more self contained,
assuming you have PHP available. I'm gradually migrating.
- mkwebphotos (perl)
- Given a directory hierarchy containing images already sized,
make thumbnails, then showpix.cgi, index.html (using showpix.cgi)
and static.html (which refers to the images alone -- good for
when you back up the web page to a CD and send it to your parents).
- thumbpage (perl)
- Make a big HTML page of thumbnails suitable for printing from a browser.
Useful if you want to keep a printed archive of your photo collection.
It turns out (not surprisingly) that lots of other people have written
similar collections of scripts:
Akkana's Software
Linux Imaging
Shallowsky Home