August 18, 2005 at 1:14 AM by Dr. Drang
A few years ago, I wanted to get a digital camera for family photographs. To convince my wife--who was in charge of organizing our photos--that this was a good idea, I told her that she would never have to do any labeling or dating of photos again. I got the camera and then had to deliver on the promise. To that end, I’ve developed a simple system of file organization and written two programs. The first, and most important, of these programs is Photopage.
Photopage looks into a directory and creates a series of index sheets, JPEG files with several individual photos laid out in rows and columns and labeled with their file name. At the top of the sheet is a title, which I use to display the month in which the photos were taken. The sheets are printed out and kept in three-ring binders, as easy to flip through as any photo album and made with very little effort. Some subsized sample sheets are given below. You can click on them to get a larger version; the original JPEGs from Photopage were about 300 dpi when printed on a letter-sized sheet of paper.
As I was writing Photopage, I realized it would be just as good for indexing my digital photo files at work. And my coworkers would probably like it, too. So I expanded the program beyond my original design, adding new layouts, subtitles, and extra captioning. Since it was going to be used by people other than me, and on Windows as well as Linux, it needed a GUI.
Photopage was my first significant Python program and it shows. There’s no object-oriented stuff, except for that imposed on me by Tkinter and PIL. And it’s probably not very Pythony, although I haven’t programmed enough Python to really understand its idioms. Still, it works.
To use Photopage, you need Python, PIL, a set of bitmapped font files
(PIL couldn’t use system fonts when I wrote Photopage; I think it can
now, but I haven’t rewritten Photopage to take advantage of them), and
the Photopage source itself. I’ve made a zip file of Photopage, the
fonts, and some elementary
available on the leancrew site. Linux users will probably have Python
installed already, and there are PIL packages for the major
distributions (Debian’s is
python2.3-imaging). Windows users can get a
Python installer from the Python download
site and a PIL installer from
installation part of the Photopage
written for Windows users. I haven’t written a Linux version because I
figure Linux users are smart enough to translate from the Windows
instructions (basically, you just need to copy--as root--the directory
with the bitmapped fonts into your PIL library directory).
I didn’t make the bitmapped fonts and don’t want to leave the impression that I did. I found them on the ‘net when I first wrote the program. I didn’t make note of the site, and now I can’t find it. If you know who made them, please let me know so I can give credit and thanks.