WebThumb

This is a very simple little tool. I wrote it because I was tired of generating web pages for my digital photos by hand, and wanted something that would make thumbnails so that the photos would be easier to navigate. On the other hand, every "photo album" generator I had ever seen irritated me - they all seemed overly complex and generated ungainly Javascript pages that took ages to load, defeating the purpose of thumbnailing. So I wrote the tool that I wanted, which generates thumbnails, gives you a table full of those thumbnails, and then leaves you the hell alone.

To install on Windows, download the files webthumb.exe, msvcr71.dll, and qt-mt336.dll and put them in your PATH. This is a command-line tool, so if you don't know what your PATH is, you probably don't want to be using this anyway. If you're on Unix, you probably know all about PATHs, but I'm not, so I don't have a build for you. Grab the source and build it yourself -- it should be pretty portable.

How to use WebThumb

The way WebThumb works is this: you make a text file, webthumb.txt by default, that tells WebThumb what images you want it to thumbnail, what labels you want to stick under them, and what other HTML you want surrounding them. You then run WebThumb, it reads the file, and spits out a bunch of thumbnails and the HTML that'll display them all pretty-like.

Here's an example of a WebThumb input file and its result. (Note: your browser might think that the input file is HTML, but it ain't, so "View Source" if you have to in order to see what it really looks like.)

Each line in the file contains one of three things:

  1. The name of a file (and an optional label for it)
  2. A configuration setting (always prepended by a \ symbol)
  3. Raw HTML to put on the page (always prepended by a # symbol)

The possible configuration settings are:

Any line that you start with a "#" will be passed right through into the HTML result. This will automatically close off any thumbnail tables that WebThumb has generated so far, so you generally don't have to worry about the HTML that WebThumb is generating for your images.

Any non-empty line that doesn't start with a "#" or a "\" is treated as a filename. Filenames can't contain spaces, because every word after the filename is treated as a caption for that image, and will be placed on the resulting web page. For example, the line:

mypicture.PNG This is my picture

will create a thumbnail of "mypicture.PNG" with a caption of "This is my picture".

WebThumb will create a directory called "thumbs" and stick a bunch of thumbnail files in there. When you upload your web page, make sure you upload that directory too.

When you run WebThumb, it will by default look for a file called "webthumb.txt" in the current directory, and unless told to do otherwise, it'll spit HTML right to the console. If you want to use a different input file, you can supply it as a command line argument, and if you want to direct the output to a file, use the \output setting in the input file to specify it.

That's it!


Contact me: spamwise at gmail dot com. Questions, suggestions, and feedback welcomed.

Back to the LeadToGold.com software directory