GlassDuck

GlassDuck: A Javascript photo album which organizes photos
by date, and automatically displays new pictures

GlassDuck Documentation

Installing

Installing is easy copy the "photos" subdirectory to a web accessible location. Thats about it. You will probably want to add some css to the top of index.html,image.html and slideshow.html to make everything fit in with your website, but you don't need to to get started.

See the section below about Server Side Languages if you can't use PHP on your site.

Uploading Images.

GlassDuck has three image directories which contain your photos at various resolutions. Image file names must be in the following format MM-DD-YY_HHMMSS.jpg The seconds are of course optional, and the date corresponds to the date/time the image was taken (more on that later).

under your photo directory you will end up with three directories for the three necessary resolutions (40x30,400x300,800x600)

photos
|-- images40
|   |-- 09-14-05_112033.jpg
|   |-- 09-14-05_112122.jpg
|-- images400
|   |-- 09-14-05_112033.jpg
|   |-- 09-14-05_112122.jpg
|-- images800
    |-- 09-14-05_112033.jpg
    `-- 09-14-05_112122.jpg

You will need to upload the right resolution to the right folder. Images will show up on the site when they are added to the "images40" folder so do that last.

It is of course recommended to rename the files first - BEFORE resizing them.

Renaming Photos

It's much harder to rename files. I have a method that works for me (in the scripts folder), but I believe it is very specific to the data my digital camera ads to the EXIF information in the image file.

Resizing Photos

I have used ImageMagick as a way to resize photos. You will find scripts in the 'scripts' directory for both PC and Linux. Drop an original file in the "drop" folder then run the script. If you can do this on your web-server you'll be doubly happy

Of course you can use any means you'd like to resize photos

Server Side Languages

GlassDuck comes by default with a "photos/files.php" script which returns a list of available images to the javascript Photo Album code. It's a small simple script and should be trivial to rewrite in Python,Perl,ASP,ColdFusion or any other language of choice.

The output from files.php (or your replacement) should be a single line with an array all the file names from the "images40" directory, followed by a count of images in the "images40" directory.

(yes this example has the same image listed twice)


var i_array=["05-19-06_171717.jpg","05-19-06_171717.jpg"];
var count=2;
 

You will need to change the following html line in image.html and slideshow.html


<script src="files.php" language="javascript"></script>
 

Please consider submitting files for other languages back to the project.