Photos:

Snapshot galleries of my life and others'

GalleriesDetailsSource

Photo Gallery Script Details

Gallery PHP Script
March 12th, 2003

In one of the amazingly rare clear headed moments I have had, I came up with this gallery system. In retrospect, I am very happy with it. The reason why is the way it is built. All of the titles, comments, and thumbnails for each image are stored in the Exif jpeg file itself. This is remarkably convenient in that all I have to do to add a new picture is edit the exif information in photoshop, then just drop the file in. No making thumbnails, no making seperate comment pages, it is all self contained.

Each gallery is simply a collection of these Exif jpeg files. The php script simply goes through every jpeg file in a chosen directory ('gallery') and builds a page using the thumbnail data that is stored in the header of each file. The comments are pulled out of the "Image Description" area of the Exif, and the title is pulled out of the Exif data as well.

This newest version has navigation links in it to make it much nicer to use. It is all based on the GD graphics library that is compiled into all version of PHP 4.3.0 and above. This version of PHP is required in order for this script to work. There are also helper scripts that I created called 'thumbnail.php' which outputs the thumbnail from the Exif header, 'display.php' which dynamically resizes the image for the image view page, and 'cookie.php' which sets the users cookie when they change the image size. These are all an exercise left up to the reader to implement :) They're pretty easy though.

Also, for those who are interested, you can view the source code of the main script. Please contact me by e-mail if you wish to use this system.

Valid XHTML 1.0! Valid CSS!

© David Woodward 2000-2003 - All rights reserved