I dislike gallery programs as well, why I have no idea. I think I wanted to write my own sometime in the past. I may still do that in the future… something with a nice web-form to upload images, user privileges and comment capability… sometime, when I have time and don’t have other obligations.
For now, what about a simple command-line set of utilities, say a one-line command-line that would make smaller images from existing jpg files (scaling properly), and some very simple PHP that would then display for you some decently formatted ‘gallery’ of your images?
My goal originally was quick display, command-line access and repeatability. The first few times I did any image storage/display on a website I did lots of manipulation with PhotoShop, that tool while awesome is also awesomely complex for ‘scaling’ images. I tried also to use The Gimp! for this task, also an awesomely bad idea… The Gimp atleast holds the promise of scriptability, it seems to fall flat on it’s face for ME for this though. So, a less complex solution was required. I fell back on an old standby for image manipulation NetPBM.
The basic plan was to:
- take a bunch of pictures on the digital camera of your choice
- transfer them over USB link to ‘some computer’ (possibly even the webserver)
- run some command-line thingy to scale them properly
- rsync them to the webserver
- copy a simple index page to make it all display like
my horrible knee scarring bike accident
- be happy…
The difficult part starts at step 3 - scaling images. Using this bourne shell script though takes all of the complexity out of that process. Step 4 is trivial:
ssh webserver mkdir /directory/of/images (example /prod/vhost/pictures/image-title-directory/ ) rsync -rpv . webserver:/directory/of/images
Basically make a directory somewhere inside the webserver’s DocumentRoot that will be where all your directories of images will live. In the top level ( /prod/vhost/pictures in the example above) there will also be a required ‘include’ directory that has the main heavy lifting component of the index.php which lives in each subject’s image directory.
Step 5 is to simply copy a sample index.php file into your new subject’s directory and alter the title variable to be appropriate, then voila images are displayed! While this all seems very high tech it really is quite simple. The content of the include index.php file and the simple sample index.php will require some editting for your environment, but comments in the files should lead you on the right directions.
Plans for the near term would include: