# Viewers 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, including the JavaScript viewers [OpenSeadragon](#openseadragon) and [IIPMooViewer](). Alternatively, images can be dynamically resized, cropped and exported. ## OpenSeadragon {#openseadragon} [OpenSeadragon](https://openseadragon.github.io/) is an open-source JavaScript viewer with built-in support for the IIP protocol from version 6.0.0 onwards. It is a good choice for new projects, and it also supports IIIF, DeepZoom and Zoomify. See the [OpenSeadragon IIP tile source documentation](https://openseadragon.github.io/examples/tilesource-iip/) for the full set of options. Include OpenSeadragon on your page, add a container for the viewer, and configure an IIP tile source with the URL of your iipsrv endpoint and the path of the image on the server: ```html
``` The `iipsrv` parameter is the URL of the server's FastCGI endpoint (or just `/iiif/` if you use URI mapping) and `image` is the image path on the server. If OpenSeadragon is hosted on a different domain to iipsrv, enable CORS on the image server — see the [server configuration](). Optional tile source parameters include `format` (e.g. `jpg`, `webp`, `png`, `avif`) and `transform` for server-side image processing. ## IIPMooViewer IIPMooViewer is a high performance [Mootools]() based Ajax Javascript client. See the [IIPMooViewer page]() for more details. ## Dynamic Image Export {#cvt} 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): ```html ``` 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: ```html
``` 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: ```html ``` ## 3rd Party Viewers {#client} 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): ```text /fcgi-bin/iipsrv.fcgi?IIIF=/your/image/path.tif ``` For Zoomify-based clients, use an image path of the form: ```text /fcgi-bin/iipsrv.fcgi?Zoomify=/your/image/path.tif ``` For DeepZoom, add a *.dzi* suffix to the path name: ```text /fcgi-bin/iipsrv.fcgi?DeepZoom=/your/image/path.tif.dzi ```