The image server digilib is a state-less web-based client-server application for interactive viewing and manipulation of images.
digilib consists mainly of two parts, the image server component proper, called “Scaler” and a client-side part that runs in the users web browser.
The users browser sends an HTTP request for a certain (zoomed, scaled, rotated) image to the Scaler server and the server returns the image data as HTTP response.
To complete the schematics of figure 1 we must also take into account that the client-side part consisting of HTML and Javascript code has also been requested and loaded from a frontend-web server into the users browser.
To date there are several frontend implementations for digilib like the current “jquery” version that only requires static HTML and Javascript and the older “greyskin” version (grey buttons, implemented in JSP) that come with the default digilib distribution or the “Zogilib” frontend version implemented in ZOPE.
The frontend-server and the Scaler-server do not have to run on the same machine and often there are several frontends that use the same Scaler server.
The format of the HTTP requests for the frontend and the Scaler server can be completely different. The HTML and Javascript code of the frontend just has to generate the correct request for the Scaler to produce the desired image. Most of the current frontend implementations share some or all of the parameters with the Scaler API.
The Scaler API is documented on the digilib.sourceforge.net pages. Here is a minimal version:
The Scaler servlet takes parameters in the HTTP request format: Scaler?param1=value1¶m2=value2&... Unknown parameters will be silently ignored.
Recognised parameters:
The image will be scaled equally in horizontal and vertical direction such that the resulting image does not exceed the rectangle [dw,dh]. If only either height or width is given the image is scaled to match only the given parameter. The size of the resulting image in the other parameter is determined by the aspect ratio of the image.
An example for a Scaler URL is: http://digilib.mpiwg-berlin.mpg.de/digitallibrary/Scaler?fn=experimental/digilib-test/images&wh=0.1712&ww=0.1282&wy=0.1681&wx=0.6895&dw=862&dh=904 such a URL can be used as src attribute to an img element in the frontend HTML.