ColumnIntroducing Title Zoomify Image Adam EditorSmith Zoomify Image is a mature product most users and allows them to view access to the full data of the original for easily publishing large, high-reso- images interactively in much greater image. detail than would otherwise be prac- lution images on the Web. End users tical or even possible.1 view these images with existing Web- Zoomify Image (sourceforge.net/ Deploying browser software as quickly as they projects/zoomifyimage) was created Zoomify Image do normal, downsampled images. A at Cornell University in collabora- tion with Zoomify to create an open- Dependencies and winstal- Flash-based Zoomifyer client asyn- source, cross-platform, and scriptable lation chronously streams image data to the version of the processing software Web browser as needed, resulting in that creates the image data displayed Zoomify Image was designed ini- tially to be a faithful, cross-platform response times approaching those of in a Zoomifyer client. This work was immediately integrated into an inno- port of Zoomify’s image-processing desktop applications using minimal vative content-management system software. It was developed in close bandwidth. The author, a librarian at that was being developed within the cooperation with Zoomify to pro- Cornell University and the principal Zope Application Server, a premier vide a scriptable method for invok- Web application and publishing plat- ing the image-preparation process architect of a small, open-source com- form. Authors in this system can for Zoomifyer clients so this technol- pany, worked closely with Zoomify add high-resolution images just as ogy could be used in more environ- to produce a cross-platform, open- they normally add downsampled ments. source implementation of that com- images, and the image is automat- Zoomify Image is written in the ically processed on the server by Python programming language and pany’s image-processing software Zoomify Image and displayed within uses the third-party Python Imaging and discusses how to easily deploy a Zoomifyer client. Zoomify Image is Library (PIL) with JPEG support, the product into a widely used Web- now in its second major release on both of which are also open source and cross-platform. It has been tested publishing environment. Limitations Source Forge and contains user con- tributed software to easily deploy it in the following environments: are also discussed as are areas of in other environments such as PHP. improvement and alternatives. Zoomifyer has been used in a ■ Python 2.1.3 number of applications in many ■ PIL 1.1.3 fields, and can greatly enhance many oomifyer from Zoomify (www research and instructional activities. and .zoomify.com) enables users Applying Zoomifyer to digital-image Zto view large, high-resolu- collections is obvious, allowing ■ Python 2.4.3 tion images within existing Web- libraries to deliver an unprecedented ■ PIL 1.1.4 browser software while providing level of detail in images published a rich, interactive user experience. to the Web. New applications also Installers for Python and PIL exist A small Zoomifyer client, authored suggest themselves, such as serving for all major platforms and can be in Macromedia Flash, is embedded high-resolution images taken from obtained at python.org and www in an HTML page and makes asyn- tissue samples in a medical lab or .pythonware.com/products/pil. chronous requests to the server to using Zoomifyer in advanced geo- The installation documentation stream image data back to the client spatial image applications, particu- that comes with PIL will help you as needed. By streaming the image larly when advanced client features locate the appropriate JPEG libraries data in this way, the image renders as such as annotations are used. if they are missing from your system. quickly as a normal, downsampled The Zoomifyer approach also has For MacOSX, you can find pre-built image, even for images that are giga- positive implications for preservation binary installers for Python, PIL and bytes in size. As the user pans and and copyright protection. Zoomify Zope at sourceforge.net/projects/ zooms, the response time approaches Image generates cached derivatives mosxzope. that of desktop applications while of master image files so the image using the smallest possible band- masters are never directly accessed width necessary to render the image. in the application or sent over the And because Flash has 98.3 per- Internet. Image data are stored and Adam Smith ([email protected]) is a cent browser saturation, viewing transmitted to the client in small Systems Librarian at Cornell University “Zoomified” images is seamless for chunks so that end users do not have Library, Ithaca, New York. Author ID box for 3 column layout 48 INFORMATION TECHNOLOGY AND LIBRARIES | MARCH 2007 The “EZ” version of the Zoomifyer extension, the directory is named Zoomify Image objects appears. client, a Flash-based applet with basic by appending “_data” to the image After selecting this option, a form pan and zoom functionality, is pack- name, so that an image file named is presented that is identical to the aged with Zoomify Image for conve- “test” would have a corresponding form used for adding ordinary Image nience so the software can be used directory called “test_data.” If the objects within Zope. When an image immediately once installed. The EZ process is re-run on the same images, is uploaded using this form, Zope client is covered by a separate license any previously generated data are automatically invokes the Zoomify and can be easily replaced with more automatically deleted before being Image conversion process on the advanced clients from Zoomify at regenerated. server and links the generated data www.zoomify.com. (A description of Zoomify provides substantial to the default Zoomifyer client that how to upgrade the Zoomifyer client documentation and sample code on comes with the distribution. If the is included in this paper.) its Web site that demonstrates how image is subsequently edited within After Python and PIL with JPEG to use the data generated by Zoomify ZMI to upload a new version, any support are installed, download Image in several environments. User- existing conversion data for that the Zoomify Image software from contributed code is bundled with image are automatically deleted, and sourceforge.net/projects/zoomify- Zoomify Image itself, further dem- the new conversion data are gener- image and decompress it. onstrating how to dynamically incor- ated to replace them, just as when porate this conversion process into invoked on the command line. several environments. An example of Again, the uploaded image can be Using Zoomify Image the use of Zoomify Image within the in any format that Zope recognizes as from the command line Zope Application Server is given. having a content-type of “image/...” and that PIL can read. The only Begin exploring Zoomify Image by potential “gotcha” in this process is invoking it on the command line: Incorporating Zoomify that in the versions of the Zoomifyer client the author has tested, Zoomify python <your_path>/ZoomifyFilePr Image into the Zope Image objects that have file names ocessor.py <your_image_file> Application Server (in Zope terminology, the file name is the object’s “id” property) with Or, to process more than one file at The popular Zope Application Server extensions other than “.jpg” are not a time: contains a number of built-in services displayed properly by the Zoomifyer including a Web server, FTP and client. So, when uploading a TIFF python <your_path>/ZoomifyFile WebDAV servers, plug-ins for access- image, for example, the id given Processor.py <image_1> <image_2> ing relational databases, and a hier- to the Zoomify Image object should <image_3> archical object-oriented database that either not contain an extension, or it uses a file-system metaphor for stor- should be changed from image.tif to The file format of the images input age. This object database provides a something like image_tif. This bug to Zoomify Image are typically either unique opportunity to incorporate has been reported to Zoomify and TIFF or JPEG, but can be any of the Zoomifyer into Zope seamlessly. may be fixed in newer versions of the many formats that PIL can read.2 An To use Zoomify Image with Zope, Flash-based viewing software at the image called “test.jpg” is included in the distribution must be decom- time of publication. the Zoomify Image distribution and pressed into your Zope Products To view the image within the is of sufficient size and complexity to directory. For versions 2.7.x and up, Zoomifyer client, simply call the provide an interesting example. this is at: “view” method of the object from During processing, Zoomify within a browser. So, for a Zoomify Image creates a new directory to <zope_instance_home>/Products/ Image object uploaded to: hold the converted image data in the same location as the image file being In Zope versions prior to the 2.7.x http://<your_domain>/test/test.jpg processed. The name of this direc- series, the Products directory is at: tory is based on the file name of the go to this URL: image being processed, so that, for <zope_home>/lib/python/ example, an image called “test.jpg” Products/ http://<your_domain>/test/test. would have a corresponding folder jpg/view called “test” containing the converted Restart Zope and now within image data used by the Zoomifyer the Web-based Zope Management Or, to include this view of the client. If the image file has no file Interface (ZMI), the ability to add image within a Zope Page Template Introducing ZOOMIFY Image | Smith 49 is further divided into tiles that are, lower-numbered tiles, so 0-0-0.jpg is (ZPT), simply call the tag method of at most, 256 pixels wide by 256 pixels always in TileGroup0.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages4 Page
-
File Size-