Images images images

May 3, 2006 at 10:10 am Leave a comment

Images are everything in the rare book trade. Unlike many other booksellers, antiquarian dealers are not dealing merely with the content of their books. Sure, each title and each author and each publisher and each year represent different values on an item, but the crunch really comes when you start having to talk about a book's condition. As the old adage goes "A picture speaks a million words…", and its true. Online sales for our bookshop are directly related to the number of images we have of each stock item. Usually, if there is no image available we will get an enquiry email requesting one.
But this is all obvious to anyone in the trade. However, there are still a whole bunch of problems that anyone working with images is likely to come across. Hopefully, in this little post I can clear up some problems by discussing some of the methods that we use to deal with a large catalogue of stock images.

One of the most important things that we have had to iron out is how to name images in a meaningful way that makes it easy for us to find the images that we need. When you have around 15,000 images to look through it can quickly become a problem finding what you are looking for. All of our stock is assigned a unique ID in the form of a number, at the moment that it is stocked into our database. This unique ID is then used as a reference for each stock item. As a result, we name all of our images using the unique ID as the filename, and then alpha characters thereafter to distinguish different photographs of the same stockitem. So, for a stockitem with ID 23456, the corresponding image is labelled 23456.jpg. Subsequent images of the same stockitem are then named 23456a.jpg and 23456b.jpg. This makes it particularly easy for us to find images relating to a particular stock item. It also gives us the flexibility of writing a number of scripts that can do nifty tricks with our images, such as moving them to an archive folder should a stock item get sold.

Image Formats and Size

Frequently, we come across all sorts of different requirements for our images. Sometimes, they need to make their way into printed catalogues, sometimes they need to be emailed to customers, and sometimes they need to find a place somewhere on the web. As a result, a single image may need to be stored in a number of different sizes and in different formats. As a result, all of our photographs of stock items are initially taken as high-resolution (300dpi) TIFF images, suitable for print. These are then stored using the aforementioned nomenclature in a HIGH-RES folder. Fortunately, our server is linux based providing us with a wide range of scripting utilities and opensource software that allow us to automate a bunch of tasks from here on out. We tend to use the Python scripting language, or the bash shell, to do most of our scripts and we use ImageMagick to process our images. Both Python and ImageMagick can run under Windows and MacOS X, so you could still check them out if you're looking into this.

Our main image script checks for images in the HIGH-RES folder that have a timestamp indicating that the image is either new or has been edited within the last 24 hours. For each of these images, we use ImageMagick's convert tool to produce lower resolution JPEG images for our website and for email purposes. With a short script, high resolution TIFF images are copied and converted into 72dpi JPEG thumbnails and web-friendly normal sized images and stored in a new folder ready to be used on our website or to be emailed to customers.

Image Publication

Naturally images of stock find their way into all sorts of mediums. And generally, you're going to have to upload them somewhere. Keeping track of what you've already uploaded and avoiding having to upload whole image collections repeatedly can be a real pain. If you own your own webserver, and it runs linux, you might want to consider using something like rsync. This fantastic utility allows us to keep an image folder on our webserver in sync with an image folder on our local file server. This way, new and edited images alone are uploaded regularly to our webserver. The folder structure and file nomenclature is identical in both places. In effect, our webserver image folders act as a backup for our local store of images, and we reduce network traffic by only uploading the changes that take place in the folders.

Equally, we upload images for our ABE listings. In this situation, we don't have access to neat facilities like rsync. So, once again, we pulled out our python scripting tools and wrote a few scripts. Our script checks all of the images in the image folder and stores their timestamps in a database. The script checks image timestamps against the information in the database. If the timestamp has changed or the image is not listed in the database, the script opens an ftp connection to ABE and performs the upload. The image details are then added to the database so that the script can track that it was uploaded.


I hope that this has been helpful to any other IT staff out there that have to deal with large quantities of stock images. If you have any other ideas on how to handle images, or you would like some further advice, please feel free to leave comments. 


Entry filed under: Uncategorized.

Tools of the trade Collecting made easy

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Subscribe to the comments via RSS Feed

Recent Posts

RSS New books at Shapero’s

  • An error has occurred; the feed is probably down. Try again later.

RSS New Books at Maggs

  • An error has occurred; the feed is probably down. Try again later.

%d bloggers like this: