Clients
IIPMooViewer
IIPMooViewer is a high performance Mootools based Ajax Javascript client. See the IIPMooViewer page for more details.
JIIPImage Java Client
The client is written in Java and communicates directly with the server to request portions of the image at the desired resolution. It is able to efficiently cache image tiles and provies a very fast interface to the high resolution image.
Usage
The client can either be used as an applet embedded within a web page or as a standalone application. For applet use, the following parameters must be supplied:
<pre><object classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,5,0,0" width="600" height="400" > <param name="type" value = "application/x-java-applet;version=1.5" /> <param name="code" value="iipimage.jiipimage.JIIPView" /> <param name="archive" value="jiip-view.jar" /> <param name="codebase" value="." /> <param name="serverName" value="http://<em>YOUR_SERVER_HERE/fcgi-bin/iipsrv.fcgi" /> </param><param name="imageName" value="<em>/YOUR/PATH/TO/IMAGES/image.tif" /> <param name="cache" value="1000" /> <comment> <embed type = "application/x-java-applet;version=1.5" \ code = "iipimage.jiipimage.JIIPView" \ archive = "jiip-view.jar" \ codebase = "." \ width = 600 \ height = 400 \ pluginspage = "http://java.sun.com/products/plugin/index.html#download"> serverName = "http://<em>YOUR_SERVER_HERE</em>/fcgi-bin/iipsrv.fcgi" \ imageName = "<em>/YOUR/PATH/TO/IMAGES/image.tif</em>" \ cache = "1000" \ <noembed> alt="Your browser understands the <applet> tag but isn't running the applet, for some reason." Your browser is completely ignoring the </applet><applet> tag! </applet></noembed> </embed> </comment> </param></object>
Alternatively, the client can be used in standalone mode like this:
java JIIPView http://address/iipsrv.fcgi /path/image.tif
Dynamic JPEG Generation
It is also possible to embed links to dynamically generate JPEG images in a web page using the IIP protocol CVT=JPEG command to generate an image of the desired width. The FIF=image command specifies the absolute path to the image on the server machine and WID=width or HEI=height specify the width or height respectively. Note that the widths and heights available are 1/2, 1/4, 1/8 … of the full sized image. If you ask for a size between these values, the closest available size will be returned. In the following example, a JPEG image of 400 pixels in width is generated from a source TIFF image located at /tmp/test.tif on the local server machine:
<a href="http://127.0.0.1/fcgi-bin/iipsrv.fcgi?FIF=/tmp/test.tif&WID=400&CVT=JPEG"> Link </a>
Alternatively, forms can be used to give the user some choice over the final image size and JPEG quality. In this case, simply create form inputs with the values for FIF, WID, QLT and CVT. For example:
<form action="http://127.0.0.1/fcgi-bin/iipsrv.fcgi" method="post"> <input type="hidden" name="FIF" value="/tmp/test.tif" /> <input type="text" name="WID" /> <input type="text" name="QLT" /> <input type="hidden" name="CVT" value="JPEG" /> </form>
A specific region of the image can also be specified via the RGN=left,top,width,height command where the left,top,width and height are defined as floating point numbers between 0 and 1. So, if you want the image to be the middle 50% of the image, use:
RGN=0.25,0.25,0.5,0.5
Old Javascript Client
A Javascript based client can also be used when Java is not available. Instead of requesting a series of image tiles, a combination of the IIP protocol CVT and RGN or JTL commands can be used to display complete image JPEG regions.
An example Javascript client is available on the demo page. To use it on your own site, modify the source and that of the linked javascript file (based on the cross-platform DHTML library by Walter Zorn). The image sizes specified in these files need to be customised as well as, of course, the image location and, if required, the page styling. This example client should work with most browsers and has been tested with Mozilla, Firefox and Internet Explorer (versions 5 onwards).
