This is a textual representation of a lightning talk done on Feb 26th at Code4Lib 2008. When the video of the talk is up (thanks, Noel!) I’ll link it here, too. The video is now available, and that article includes an update on progress since the this article was posted.
OhioLINK has a collection of JPEG2000 images as an access format that were generated for use in our DLXS-based content system. We are in the process of migrating those collections to DSpace and were looking for a mechanism to leverage the existing JPEG2000 files and not have to generate new derivatives. We are also considering the use of JPEG2000 as a preservation format, and would find it attractive to use the same image format for both access copies and preservation copies. We looked at Zoomify, but to perform its scaling function it generates JPEG tiles at several resolutions and storing those tiles can triple or quadruple disk space requirements. Or, one could use the ‘enterprise’ version of Zoomify and its proprietary PFF format or the equally proprietary MrSID format. We didn’t want to be locked into either of these scenarios. Our solution is to create a web application that mimics the directory-of-JPEG-tiles solution, but to dynamically generate the tiles our of a JPEG2000 master.
The free version of Zoomify reads JPEG tiles out of a directory structure that looks like this:
The shim mimics that directory structure. It parses the URL of the request and dynamically creates the appropriate JPEG tile (or metadata file) out of the JPEG2000 image.
The Code
The JPEG2000 for Zoomify shim requires Java 1.5 or greater. It does not require a servlet engine; rather, it uses the Restlet library to perform as a stand-alone application. The OneJar library allows the Java classes and required dependencies to be bundled into a single JAR file. We’re using the Kakadu Software JPEG2000 library to perform the on-the-fly decoding of JPEG2000 images. Kakadu is a commercial JPEG2000 codec, although inexpensive licenses are available for not-for-profit activity. We are using the Enterprise version of Zoomify, a Flash-based image viewer, although I believe the free version will work as well. (You’ll need the Enterprise version to be able to modify and adapt the appearance of the Zoomify applet.) The same techniques can also be used for other Flash applets and probably even JavaScript-based viewers (a la Google Maps).
The source code is available from the OhioLINK DRC source code repository (Subversion access). We plan to integrate it into DSpace 1.5 as part of the Ohio Digital Resource Commons, and I may create a Fedora disseminator to serve up the tiles as well.
Thanks go out to Keith Gilbertson and John Davison on the OhioLINK staff for their help in making this work as well as Stu Hicks and François d’Erneville for being a sounding board for these ideas.
(This post was updated on 15-May-2008.)





5 Comments
Great to know about this, Peter. Thanks for posting! –Rob
Have you looked at GSIV for delivery? The Biodiversity Heritage Library is also delivering JP2 via JPG tiles (see this example page), but we’re using the proprietary LizardTech ExpressServer to decode (we were long-time MrSID users) and the open source GSIV for display in the browser. Worth looking into if you haven’t already.
@chris
What version of LizardTech ExpressServer are you running? We are having a problem with it not rendering in mozilla based browsers, and Safari < 3.
thanks!
What a great idea.
We had similar problems with the disk space requirements mushrooming for large collections, and the time required to generate the tiles for each new image. My solution was to not Zoomify the images (we use plain Jpeg) but make a custom Flash viewer using Actionscript that loads the entire file. With networks speeds being so fast it is feasible.
But now, you have given me an idea that it would be doable to also dynamically dish up Zoomify tiles for large Jpeg files server-side. Would need a simple Python script to do. I will add this to my TO-DO list…
@Etienne –
Thanks for the kind comments. Some of the files we’re working with are several 10s’ of megabytes in size, so dumping them across the net to the browser isn’t a great option for us. I’d be curious to hear about how your script to generate the Zoomify tiles using Python works out; let me know!
5 Trackbacks
[...] of Code4Lib 2008 presentations possible. I just had a chance to notice that the video from my JPEG2000 to Zoomify Shim lightning talk was [...]
Post a Comment