IIPImage is a client / server system. The IIPImage server streams images to the client application, typically embedded within a web page. There are several clients to choose from in either Javascript (IIPMooViewer), Flash (IIPZoom) or Java (JIIPImage). Alternatively, images can be dynamically resized, cropped and exported.
IIPMooViewer
IIPMooViewer is a high performance Mootools based Ajax Javascript client. See the IIPMooViewer page for more details.
IIPZoom
IIPZoom is a flash client with smooth fast zooming and panning. See the IIPZoom 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 Image Export
It is also possible to dynamically export resized or cropped versions of image by using parameters in your URL with the IIP protocol CVT=JPEG
. JPEG images can be instantly generated for any region within the image at the requested size. This is useful for many purposes, such as generating low resolution views or thumbnails of high resolution content and could also be used to create responsive images.
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. 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 IIP server machine (note that CVT=jpeg must always be the final parameter):
<img src="/fcgi-bin/iipsrv.fcgi?FIF=/tmp/test.tif&WID=400&CVT=jpeg" />
If both WID and HEI are specified, the output image will maintain aspect ratio and fit the image within the box defined by the given width and height. This dynamic resizing can also be used for responsive images.
As well as specifying the size directly within the URL, 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="/fcgi-bin/iipsrv.fcgi" method="get"> <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>
To specify a particular region, use 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:
<img src="/fcgi-bin/iipsrv.fcgi?FIF=/tmp/test.tif&WID=400&RGN=0.25,0.25,0.5,0.5&CVT=jpeg"/>
3rd Party Viewers
The IIPImage server can also be used with a number of other 3rd party viewers. The server can be used with any viewer that supports either the IIIF, Zoomify or DeepZoom protocols.
For IIIF-based clients, use an image path of the form (and see this blog post for more information on IIIF use):
/fcgi-bin/iipsrv.fcgi?IIIF=/your/image/path.tif
For Zoomify-based clients, use an image path of the form:
/fcgi-bin/iipsrv.fcgi?Zoomify=/your/image/path.tif
For DeepZoom, add a .dzi suffix to the path name:
/fcgi-bin/iipsrv.fcgi?DeepZoom=/your/image/path.tif.dzi