Article Preview
Buy Now
COLUMN
Simple Photo Gallery
An app to generate web photo galleries
Issue: 12.6 (November/December 2014)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 25,534
Starting Page Number: 58
Article Number: 12607
Resource File(s):
12607project.zip Updated: 2014-11-03 13:59:02
Related Link(s): None
Excerpt of article text...
Today we're going to do something a little different. I thought I'd share with readers a little project I recently completed. It's fairly simple, but has an interesting mix of technologies.
A few years ago I wrote—in literally a couple of hours—a simple photo gallery generator for my personal blog. All it did was allow me to dump a bunch of photos into it, set a title and watermark text, and then it generated the thumbnails, main HTML page, and links to the higher-resolution images (which it watermarked). The program worked fine for my needs at the time, though it was incredibly primitive—it didn't even provide a way to save the gallery set-up information. (If you needed to regenerate the gallery, you had to start over from scratch.)
Recently, however, I had a need for a more sophisticated photo gallery. In particular, I needed support for photo captions. Captions are an incredible pain. Unless you create a database where the photos and their respective captions can be stored together, it's a nightmare to keep the captions and photos linked together (especially if you later add or remove photos in the gallery).
I didn't want to use a database: I wanted this simple. (That's also why I didn't want to use existing photo gallery software. I could generate photo galleries via Adobe Photoshop or Apple's iPhoto, but those programs require too much overhead. I wanted something really fast and easy.)
A solution occurred to me: why not have the caption in the photo
filenames ? Quickly a project spec emerged:
- reuse as much of my original Simple Photo Gallery as I could
...End of Excerpt. Please purchase the magazine to read the full article.