Introducing Zoomify Image

Zoomify Image is a mature product for easily publishing large, high-resolution images on the Web. End users view these images with existing Webbrowser software as quickly as they do normal, downsampled images. A Flash-based Zoomifyer client asynchronously streams image data to the Web browser as needed, resulting in response times approaching those of desktop applications using minimal bandwidth. The author, a librarian at Cornell University and the principal architect of a small, open-source company, worked closely with Zoomify to produce a cross-platform, opensource implementation of that company’s image-processing software and discusses how to easily deploy the product into a widely used Webpublishing environment. Limitations are also discussed as are areas of improvement and alternatives.

Zoomify Image is a mature product for easily publishing large, high-resolution images on the Web.End users view these images with existing Webbrowser software as quickly as they do normal, downsampled images.A Flash-based Zoomifyer client asynchronously streams image data to the Web browser as needed, resulting in response times approaching those of desktop applications using minimal bandwidth.The author, a librarian at Cornell University and the principal architect of a small, open-source company, worked closely with Zoomify to produce a cross-platform, opensource implementation of that company's image-processing software and discusses how to easily deploy the product into a widely used Webpublishing environment.Limitations are also discussed as are areas of improvement and alternatives.
Z oomifyer from Zoomify (www  .zoomify.com)enables users to view large, highresolu tion images within existing Web browser software while providing a rich, interactive user experience.A small Zoomifyer client, authored in Macromedia Flash, is embedded in an HTML page and makes asyn chronous requests to the server to stream image data back to the client as needed.By streaming the image data in this way, the image renders as quickly as a normal, downsampled image, even for images that are giga bytes in size.As the user pans and zooms, the response time approaches that of desktop applications while using the smallest possible band width necessary to render the image.And because Flash has 98.3 per cent browser saturation, viewing "Zoomified" images is seamless for most users and allows them to view images interactively in much greater detail than would otherwise be prac tical or even possible. 1oomify Image (sourceforge.net/projects/zoomifyimage) was created at Cornell University in collabora tion with Zoomify to create an open source, crossplatform, and scriptable version of the processing software that creates the image data displayed in a Zoomifyer client.This work was immediately integrated into an inno vative contentmanagement system that was being developed within the Zope Application Server, a premier Web application and publishing plat form.Authors in this system can add highresolution images just as they normally add downsampled images, and the image is automat ically processed on the server by Zoomify Image and displayed within a Zoomifyer client.Zoomify Image is now in its second major release on Source Forge and contains user con tributed software to easily deploy it in other environments such as PHP.
Zoomifyer has been used in a number of applications in many fields, and can greatly enhance many research and instructional activities.Applying Zoomifyer to digitalimage collections is obvious, allowing libraries to deliver an unprecedented level of detail in images published to the Web.New applications also suggest themselves, such as serving highresolution images taken from tissue samples in a medical lab or using Zoomifyer in advanced geo spatial image applications, particu larly when advanced client features such as annotations are used.
The Zoomifyer approach also has positive implications for preservation and copyright protection.Zoomify Image generates cached derivatives of master image files so the image masters are never directly accessed in the application or sent over the Internet.Image data are stored and transmitted to the client in small chunks so that end users do not have access to the full data of the original image.

Dependencies and winstallation
Zoomify Image was designed ini tially to be a faithful, crossplatform port of Zoomify's imageprocessing software.It was developed in close cooperation with Zoomify to pro vide a scriptable method for invok ing the imagepreparation process for Zoomifyer clients so this technol ogy could be used in more environ ments.
Zoomify Image is written in the Python programming language and uses the thirdparty Python Imaging Library (PIL) with JPEG support, both of which are also open source and crossplatform.It has been tested in the following environments: Installers for Python and PIL exist for all major platforms and can be obtained at python.org and www .pythonware.com/products/pil.
The installation documentation that comes with PIL will help you locate the appropriate JPEG libraries if they are missing from your system.For MacOSX, you can find prebuilt binary installers for Python, PIL and Zope at sourceforge.net/projects/mosxzope.
The "EZ" version of the Zoomifyer client, a Flashbased applet with basic pan and zoom functionality, is pack aged with Zoomify Image for conve nience so the software can be used immediately once installed.The EZ client is covered by a separate license and can be easily replaced with more advanced clients from Zoomify at www.zoomify.com.(A description of how to upgrade the Zoomifyer client is included in this paper.) After Python and PIL with JPEG support are installed, download the Zoomify Image software from sourceforge.net/projects/zoomifyimage and decompress it.

Using Zoomify Image from the command line
Begin exploring Zoomify Image by invoking it on the command line: python <your_path>/ZoomifyFilePr ocessor.py<your_image_file> Or, to process more than one file at a time: python <your_path>/ZoomifyFile Processor.py<image_1> <image_2> <image_3> extension, the directory is named by appending "_data" to the image name, so that an image file named "test" would have a corresponding directory called "test_data."If the process is rerun on the same images, any previously generated data are automatically deleted before being regenerated.
Zoomify provides substantial documentation and sample code on its Web site that demonstrates how to use the data generated by Zoomify Image in several environments.User contributed code is bundled with Zoomify Image itself, further dem onstrating how to dynamically incor porate this conversion process into several environments.An example of the use of Zoomify Image within the Zope Application Server is given.

Incorporating Zoomify Image into the Zope Application Server
The popular Zope Application Server contains a number of builtin services including a Web server, FTP and WebDAV servers, plugins for access ing relational databases, and a hier archical objectoriented database that uses a filesystem metaphor for stor age.This object database provides a unique opportunity to incorporate Zoomifyer into Zope seamlessly.
To It is possible that the Zoomify Image conversion process will not have had time to complete when someone tries to view the image.The Zoomify Image object will attempt to degrade gracefully in this situation by trying to display a downsampled version of the image that is gener ated part way through the conver sion process, or, if that is also not available, finally informing the user that the image is not yet ready to be viewed.This logic is built into the tag method.
To add larger images more effi ciently, or to add images in bulk, the Zoomify Image distribution contains detailed documentation to quickly configure Zope to accept images via FTP or WebDAV and automatically process them through Zoomify Image when they are uploaded.
Finally, the default Zoomifyer cli ent can be overridden by uploading a custom Zoomifyer client into a loca tion where the Zoomify Image object can "acquire" it, and giving it a Zope id of "zoomifyclient.swf".

How it works
To be viewed by a Zoomifyer cli ent, an image must be processed to produce tiles of the image at differ ent scales, or tiers.An XML file that describes these tiles is also necessary.Zoomify Image provides a cross platform method of producing these tiled images and the XML file that describes them.
Beginning at 100percent scale, the image is successively scaled in half to produce each tier, until both the width and height of the final tier are, at most, 256 pixels each.Each tier

Limitations
Zoomify Image was developed to meet two goals: 1. to provide a crossplatform port of the Zoomifyer con verter for use in UNIX/Linux systems, and 2. to make the converter script able, and ultimately integrate it into opensource contentman agement software, particularly Zope.
This Zoomifyer port was writ ten in Python, a mature, highlevel programming language with an execution model similar to Java.Although Zoomify Image continues to be optimized, compared to the official Zoomify conversion software, it is slower and more limited in the sizes of images it can reasonably process.Anecdotally, Zoomify Image has been used effectively on images hundreds of megabytes large, but significant performance degradation has been reported in the multigiga byte range.
Because of these limitations in Zoomify Image, the official Zoomify imageprocessing software is recom mended for converting very large images manually in a Windows or Macintosh environment.The Zoomify Image product is recommended in the following circumstances:

■
The conversion must be per formed on a UNIX/Linux machine.

■
The conversion process must be scriptable, such as for batch pro cessing or being run dynamically.

■
Images sizes are not in the multi gigabyte range.
If a scriptable, crossplatform version of the Zoomifyer converter is needed, but performance is an issue, several things can be done to extend the current limits of the soft ware.Obviously, upgrading hard ware, particularly RAM, is effective and relatively inexpensive.Running the latest versions of Python and PIL will also help.Each new version of Python makes significant perfor mance improvements, and this was a primary goal of version 2.5, which was released in September 2006.
The author believes that the cur rent weak link in the performance chain is related to how Zoomify Image is loading image data into memory with PIL during processing.In the current distribution, a Python script contributed by Gawain Avers, which is based partially on the Zoomify Image approach, uses ImageMagick instead of PIL for image manipula tion and is better able to process multigigabyte images.The author would like to add the ability to des ignate the image library at runtime in future versions of Zoomify Image.

Future development
Beyond improving the performance of the coreprocessing algorithm, the author would also like to explore opportunities for more efficiently processing images within Zope, such as spawning a background thread for processing images so the Zope Web server can immediately respond to the client's imagesubmission request.The author would also like to improve the tag method to display data more flexibly in the Zoomifyer client and ensure consistent behav ior with Zope's default Image tag method.Finally, Zoomify Image could also benefit from the addi tion of a simple configuration file to control such runtime properties as image quality and which thirdparty imageprocessing library to use, for example.

Conclusion
Zoomify Image is mature, open source software that makes it pos sible to publish large, highresolution images to the Web.It is designed to be convenient to use in a variety of architectures and can be viewed within existing browser software.Download it for free, begin using it in minutes, and explore its unique possibilities.

Figure 1 .Figure 2 .
Figure 1.Tiers and tiles for a 2048 x 2048 pixel image