| By Joe Barr | Article Rating: |
|
| January 24, 2001 12:00 AM EST | Reads: |
781 |
A lot of my experimentation lately has been about graphics: cameras, printers, and scanners. It dawned on me that it was time to do something productive with all those toys. I decided to put together an online photo album so that friends and family could easily keep up with the latest happenings in my life, and maybe share rare old family photos that up until now could be enjoyed only in person.
I began my latest expedition the same way I've started many others, by visiting Freshmeat.net (see Resources for a link). Searching for "album" returned almost 60 possibilities. I'm sure that I missed a lot of good ones, but I quickly found one that not only had the features I wanted, but also had precious few dependencies, and promised to be easy enough for even a dweeb journalist to install. So I chose LiveFrame Gallery, an application for Web-based photo albums. It is under the GPL, and was written and maintained by James Home.
The application consists of a Perl script, a handful of templates to control how the pages look when displayed, and a couple of configuration files. Of course you need to have access to a Web server in order to use LiveFrame Gallery. Since I wanted to display thumbnails in the albums, I also downloaded and installed a copy of ImageMagick. According to the LiveFrame Gallery homepage, future versions will include everything needed to handle batch image processing for the creation of thumbnails, but it's not soup yet. In the meantime, there are at least two Perl script add-ons for LiveFrame that handle a lot of the drudgery of manually sizing photos and creating thumbnails. You can find both of them on the Contributions page of the LiveFrame Gallery Website (see Resources for a link).
Setting up LiveFrame on my Web server was easy. Use the instructions from the Website if you're going to install it. I'm itemizing the steps I took only to show how easy installation is.
- Download the current version
- Decompress the downloaded file
- Move
liveframe.cgito Apache'scgi-bindirectory - Tailor the configuration in
liveframe.cgias required - Move the
lfdirdirectory to the root HTML directory
That's it. At that point I could run liveframe.cgi by entering the URL that pointed to it. Naturally, I got tired of doing that pretty quickly, so I added a link to my homepage that triggered execution of the script with a simple click. But even though LiveFrame was working, I wasn't nearly done. All I could do at that point was look at the three sample albums that come with the download.
It's a fact of life that one of the first things I do after installing new software is break it. That expedition was no exception. But the damage was minimal and the fix was easy. LiveFrame Gallery needs to find at least three album directories in order to present the start page. Moreover, these albums must be correctly configured. If you add a new one and it's not configured right, you won't be able to see any of them. The point I am trying to make here is this: heed the documentation and don't get rid of the three sample albums until you have three working albums of your own.
But creating a new album is no hill for a stepper. You begin by creating a subdirectory for it in the galleries directory, one of two subdirectories that live within the lfdir directory. Inside each album directory lives a simple text configuration file called config and two more directories: display and preview. The images you want to display go in display, and the thumbnails go in preview.
The configuration file contains the name of the album and the names of the images. You can add comments that will appear at the bottom of the image. The images will appear in the order in which the image names show up in the config file. The image and the thumbnail must share the same name. If that sounds complicated, it's not. Here is an example of a config file:
# the next name is the album title LinuxWorld Conference Expo # the next three lines contain images and comments, # separated by } lwce-001.jpg}Crowd awaits the opening bell lwce-002.jpg}Linus waves from tutorial room lwce-003.jpg}Bill Gates visits Red Hat booth
Nothing to it. The first uncommented line is the title, the next uncommented lines contain the image filename, a separator (the "}" character), and a comment about the image. Image comments are not required, but they can add a lot to the album. There are templates and style sheets that live in a directory apart from the gallery albums. If you want to modify the appearance of the pages as they display the images, all you need to do is hack the appropriate HTML. My dweeb nature forced me to change a few things, just to see if I could. So my albums have white text on a black background instead of the other way around. Not very daring, but you can get as rad as you like.
I would guess that it took me about half an hour from the time I downloaded LiveFrame Gallery and worked with the samples until I had an album of my own. I spent a lot more time resizing the images and creating thumbnails of them than I did setting up LiveFrame. That's where the two Perl-script add-ons that I mentioned at the top come in: they automate a lot of that work. Both require ImageMagick so that they can access its command line interface. I used this command to resize the images to 640x480:
convert imagefile-1 -geometry 640x480 imagefile-2
Creating thumbnails is done in exactly the same way, except that the geometry is changed to get the size desired:
convert imagefile-1 -geometry 64x48 imagefile-2
You can accomplish the same thing using the GIMP and a mouse, but it's a lot quicker from the command line.
I spent a couple of hours selecting the pictures, resizing them, making thumbnails, and moving them to the appropriate directories. Now I have three living photo albums that I can share with friends and family on a nearly realtime basis. All because James Home decided to scratch an itch.
Home is not a professional programmer; he is an interface designer. A combination of things led him to create LiveFrame, including the length of time it took to build image displays by hand and the poor user interfaces he found in existing open source alternatives. This history is important to Home, so here are his words on the subject:
I built LiveFrame because I was taking dozens of photos a week, and building custom HTML interfaces for each set of images, which was extremely labor intensive. When I looked for an automated replacement, I discovered that many of the publicly available image viewers that I saw, like a lot of open source software in general, suffered from an inattention to user interface. If anything, I hope LiveFrame's popularity will encourage more open source programmers to seek out designers to work with on their projects, or even encourage more technically oriented designers to take on programming projects of their own.
I don't know about you, dear reader, but I think Papa Jack would agree with me when I say that James Home has a pretty good case of the pioneer blues himself. Thanks to the free software and open source community, more and more bright young pioneers like Home are finding ways to scratch their own itches and benefit the whole community at the same time. Not to mention that they also make open source look increasingly attractive to those outside.
Published January 24, 2001 Reads 781
Copyright © 2001 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Joe Barr
Joe Barr is a freelance journalist covering Linux, open source and network security. His 'Version Control' column has been a regular feature of Linux.SYS-CON.com since its inception. As far as we know, he is the only living journalist whose works have appeared both in phrack, the legendary underground zine, and IBM Personal Systems Magazine.
- Kindle 2 vs Nook
- Is Cloud Computing Like Teenage Sex?
- GovIT Expo Highlights Cloud Computing
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Cloud Computing Can Revitalize Your Career as Software Developer
- Ubuntu-based Open Source Linux Mint Tests KDE Version
- Yahoo! SVP Shelton Shugar to Discuss Innovation at Cloud Computing Expo
- Virtualization Journal "Readers' Choice Awards" Voting Is Now Open
- Einstein, Sharks and Clouds: IT Security in the Cloud
- Adobe Flex Developer Earns $100K in New York City
- Virtualization Expo Call for Papers Deadline December 15
- Amazon Web Services Database in the Cloud
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Is Cloud Computing Like Teenage Sex?
- 1st Annual GovIT Expo: Letter from the Technical Chair
- Ulitzer News: Search vs New Media
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Confessions of a Ulitzer Addict
- GovIT Expo Highlights Cloud Computing
- Twitter, Linked In, Ning and Ulitzer: Easy Personal Branding Strategy
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- The i-Technology Right Stuff
- Linux.SYS-CON.com Exclusive: Linus Discloses *Real* Fathers of Linux
- After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly
- Linus' Top Ten SCO Barbs
- A Closer Look at Damn Small Linux
- Netscape Co-Founder's 12 Reasons for Growth of Open Source
- Introducing "Cooperative Linux" - Linux for Windows, No Less
- *POINT - COUNTERPOINT SPECIAL* What's Wrong with the Open Source Community?
- Where Are RIA Technologies Headed in 2008?
- Linux.SYS-CON.com Exclusive: What Would UserLinux Look Like?
- i-Technology Viewpoint: The New Paradigm of IT Buying
- Is Linux Desktop-Ready Yet...or Not?
































