[Skip top navbar]

Andrew Gregory's Web Pages

Guilderton Lighthouse 30°20'24"S 115°29'31"E


PhotoLoader Library Viewer


PhotoLoader Library Viewer Version History
  • Fixed bug obtaining base directory name when accessed via network paths
  • Fixed bug obtaining images directory name
  • Can customise the frame in which the daily library appears
  • Optimised frame layout slightly (moved 'About' link to calendar display)
  • Added support for four-digit years in library directory names
  • Improved speed of loading of month index pages
  • Fixed Linux with Netscape 4 compatibility problems
  • Fixed year rollover handling.
  • Improved performance and reliability of opening files
  • Made file opening multi-threaded
  • Added Internet support
  • First release to unsuspecting Internet community
  • Breaks the photo libraries into months
  • Uses template HTML files for all the index pages
  • Uses a JAR archive to store all the template and other files
  • Initial version


The PhotoLoader software bundled with the QV-3000 does the job - it lets you download photos from your camera and organise them into a library. While it could be improved, it is free and easy to use.

The problem is that it can only manage one library at a time. You can move it around, but you can't have more than one. Also, it must be stored in a fixed location and can't be arbitrarily located. Even worse, the photos and their index are stored separately!

Since I normally use Windows NT to work, I have a dual-boot computer that lets me boot to Windows 98 when I need to do important stuff like download photos via USB or play games. I have set up PhotoLoader to store my photos on my network server, allowing easy access to my photos on any computer. When I have built up a few megabytes on the server, I transfer them to CD for permanent archival.

Both these storage locations have problems. The index generated by PhotoLoader is only accessible from Windows 98. This means manually searching through the subdirectories of photos when they are on the server or CD. Not very good.

I solved the problem by writing a collection of programs to automatically generate a library index right in your web browser! It reads what daily subdirectories you have and generates an index that looks just like the one made by PhotoLoader. You should note, though, that my software only performs the indexing function. It still relies on the HTML pages generated by PhotoLoader to display each library.

My viewer allows me to add new subdirectories of photos to both my server (PhotoLoader does that) and to my CD (by simply copying the subdirectories to the CD). There is no need to update indexes as my viewer does all that automatically. I've even set up my photo CD to autostart the viewer! Plus, as my demonstration below shows, it can even be used to let you browse photos over the Internet! No changes are required for all these different locations!

How To Use It

The PhotoLoader software maintains an ImageLib directory, under that directory are subdirectories for your photos, one for each different day. They are named based on the date: YYMMDD. Apart from these image subdirectories, the ImageLib directory is empty.

Download the software (see below) and unzip the contents into your ImageLib directory. If you have more than one ImageLib directory (for example, one on your hard drive and one on your archival CD), then unzip the file into each one in turn. That's all!

Next, since the PhotoLoader does not store your library titles with your library images, you must edit the INDEX.HTM file in each library subdirectory and change its <TITLE> to the name you have given your library. The part to edit is highlighted below:


Be careful when you ask PhotoLoader to rebuild your libraries. If a library is rebuilt, the title will be set back to "Photo Loader".

If you forget to change the title, or rebuild your libraries, my viewer will let you know!

Now that you've edited your library titles, start it up! Point your browser at the libview.htm file in your ImageLib directory.


You may encounter some problems using the indexer, particularly with Microsoft Internet Explorer. In short, MSIE does not allow Java applets access to your local drives at all and by default does not let you alter the security settings to allow you to do so! The viewer will let you know if this is a problem and provide instructions to rectify the situation.

Netscape Navigator does not have this problem as it allows Java applets to have automatic access to any subdirectories under the directory they are installed into.

The viewer will work over the Internet, but it may need some help to find the image libraries. In general, if you can surf to your ImageLib directory and see a listing of your image subdirectories and the viewer files (like this), then the viewer should be able to automatically find the image subdirectories. If it doesn't seem to be working, you will need to create a file called "dirlist.txt" that lists the contents of the ImageLib directory. A suitable Unix command would be "ls -1 > dirlist.txt". This file must be in the ImageLib directory along with the viewer files. If you want to make the file manually, it must look like:

000228 000229 000301

In other words, it must list the YYMMDD directory names.

If you can surf to your ImageLib directory and see your picture subdirectories, but the viewer doesn't work, email me with the URL and I will see if the viewer could be modified to work. This feature depends on your web server and I have only been able to test with the Apache web server so far.


Much of the layout is completely customisable. Template HTML files are stored in the libview.jar file. This JAR file is a regular ZIP file. You can open it up and extract the HTM files, edit them, and put them back in.

Here are the main customisations:

Library Preview Image Size

These are normally 80 pixels maximum. Edit the "MaxPreviewDimension" in the MAIN.HTM file.

Preview Date Format

Edit the "DateFormat" parameter in the MAIN.HTM file.

Calendar Month Format

Edit the "CalendarFormat" parameter in the MAIN.HTM file.

Number of Library Preview Images

This is more complicated. Extract the LIBROW.HTM file from the JAR file. Add or remove lines with "<!--#libimg...-->", replacing "..." with numbers as appropriate. Make sure you add or remove entire lines. Add it back into the JAR file when you're done.

Target Frame for Daily Library

Edit the "TargetFrame" parameter in the MAIN.HTM file.


plview.zip ( 12K) - Unzip to your ImageLib directory(-ies).


I've set up a small demonstration, and these are the files.


I have no major plans for this viewer. The plans I had to do away with PhotoLoader have been fulfilled by my Camera Library Viewer program.