# HG changeset patch
# User robcast
# Date 1496422896 -7200
# Node ID cd45d49f438da3e783a127d2fc137917cb235f38
# Parent 5c81d249ccd0185abd5c6871a39f60ea838152a1
cleanup and add doc about Manifester servlet.
diff -r 5c81d249ccd0 -r cd45d49f438d common/doc/Scaler.html
--- a/common/doc/Scaler.html Fri Jun 02 12:41:24 2017 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-
-
-
-
-Scaler servlet
-
-
-Scaler
-
-A Servlet for scaling images. (Version 1.5.2)
-
-Web API
-
-The Scaler servlet takes parameters in the http request format:
-Scaler/request_path/?param1=value1¶m2=value2&...
-Unknown parameters will be silently ignored.
-
-Recognised parameters:
-
- - request_path path to file or directory.
-
- - fn path to file or directory below
/docuserver/images
- (or other configured image directory).
- This path will be added to the request_path
behind the servlet name.
- Either parameter can be empty.
-
- - pn page number. Index into the (alphabetically sorted) directory
- given by the path. Starts with 1. Ignored if the path points to a file.
- Default: 1.
-
- - dw destination image width (pixels). If omitted the image is scaled to fit
- dh.
-
- - dh destination image height (pixels). If omitted the image is scaled to fit
- dw.
-
- - wx relative x offset of the image area to be sent (0 <= wx <= 1).
- Default: 0.
-
- - wy relative y offset of the image area to be sent (0 <= wy <= 1).
- Default: 0.
-
- - ww relative width of the image area to be sent (0 <= ww <= 1).
- Default: 1.
-
- - wh relative height of the image area to be sent (0 <= wh <= 1).
- Default: 1.
-
- - ws additional scaling factor. The resulting image will have the size
-
[ws*dw,ws*dh]
. Default: 1.
-
- - mo flags for the mode of operation separated by ",".
-
- - fit: always scale the image to fit
-
[dw,dh]
(default).
-
- clip: send the file in its
- original resolution, cropped to fit [dw,dh]
.
-
-
- osize: scale to original size based on the image resolution
- (from the image metadata) and display resolution (from parameter
- ddpi
). Fails if either resolution is unknown.
-
-
- -
- file: send the file as-is (may
- be very large and all sorts of image types!). If configuration
- doesn't allow sending files
- (
sendfile-allowed=false
) revert to
- clip
.
-
- rawfile: send the file as-is with a mime-type of
- application/octet-stream
so it can be downloaded with
- the browser.
-
-
- - errtxt: send error response as HTML.
- errimg: response as image (default).
-
- - q0-q2: quality of interpolation in scaling
- (
q0
: worst, default).
-
- - lores: try to use scaled image (default)
-
- hires: always use unscaled image.
-
- If the image is zoomed (ww, wh < 1) the use of the scaled
- image files depends on the requested resolution.
-
- - vmir: mirror image vertically.
-
- hmir: mirror image horizontally.
-
- - jpg: the resulting image is always sent as JPEG
- (otherwise TIFF and PNG images are sent as PNG).
-
-
-
-
- - cont: change contrast of the image. Negative value
- reduces contrast, positive value enhances contrast. Pixel value is
- multiplied by 2^cont. Default: 0
-
- - brgt: change brightness of image. Negative value reduces
- brightness, positive value enhances brightness. The value brgt is
- added to the pixel value. Default: 0
-
- - rot: rotate image. Rotation angle is given in
- degrees. Default: 0
-
- - rgbm: modify color by multiplication. The contrast of the
- red green and blue components of the image can be reduced or
- enhanced similar to the
cont
parameter. The factors for
- red, green and blue are separated by slashes (for example
- 0.86/0/-0.5). Default: 0/0/0
-
- - rgba: modify color by addition. The brightness of the red
- green and blue components of the image can be reduced or enhanced
- similar to the
brgt
parameter. The factors for red,
- green and blue are separated by slashes (for example
- 100/0/25). Default: 0/0/0
-
- - ddpi: resolution of client display for
osize
mode.
- Either ddpi
or ddpix
and ddpiy
must
- be set to use osize
mode.
-
- - ddpix: resolution of client display in x direction for
-
osize
mode.
-
- - ddpiy: resolution of client display in y direction for
-
osize
mode.
-
-
-
- The image to be loaded can be specified by the
- request_path
(deprecated) or the fn
- (preferred) parameter and the optional index pn
-
- - if
fn
points to a directory then the file with
- the index pn
(in alphabetical order according to
- ASCII) will be loaded
-
- - if
fn
points to a file (with or without
- extension) then this file will be loaded
-
-
- 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.
-
-
-
-
diff -r 5c81d249ccd0 -r cd45d49f438d doc/src/site/markdown/iiif-api.md
--- a/doc/src/site/markdown/iiif-api.md Fri Jun 02 12:41:24 2017 +0200
+++ b/doc/src/site/markdown/iiif-api.md Fri Jun 02 19:01:36 2017 +0200
@@ -1,8 +1,10 @@
# The digilib IIIF API
+## IIIF Image API
+
The Scaler servlet provides not only its native [Scaler API](scaler-api.html) but also an API compliant to the standards of the International Image Interoperability Framework http://iiif.io.
-As of version 2.3.7 digilib supports the [IIIF Image API version 2](http://iiif.io/api/image/2.0/) at [compliance level 2](http://iiif.io/api/image/2.0/compliance.html). You can switch between API version 1.1 and 2.0 support with the `iiif-api-version` parameter in [digilib-config](digilib-config.html),
+As of version 2.3.7 digilib supports the [IIIF Image API version 2](http://iiif.io/api/image/2.1/) at [compliance level 2](http://iiif.io/api/image/2.0/compliance.html). You can switch between API version 1.1 and 2.0 support with the `iiif-api-version` parameter in [digilib-config](digilib-config.html),
IIIF Image API URLs for an image request have the form:
@@ -23,3 +25,23 @@
An info request URL for the same image looks like:
http://www.example.org/digilib/Scaler/IIIF/books!book1!page0002/info.json
+
+## IIIF Presentation API
+
+As of version 2.5.3 digilib provides the optional Manifester servlet that generates simple [IIIF Presentation API version 2](http://iiif.io/api/presentation/2.1) manifests that can be used with any [IIIF viewer](http://iiif.io/apps-demos/#image-viewing-clients) to navigate a directory full of images with the functions of a book-reader or light-table.
+
+To build digilib with the Manifester servlet you need to add the `iiif-presentation` profile to your Maven build:
+
+ mvn -Piiif-presentation package
+
+(or use the digilib-webapp-X.X.X-srv3p.war file from the website)
+
+The Manifester servlet URLs have the form:
+
+ http[s]://{server}/{digilib-webapp}/Manifester/{iiif-prefix}/{identifier}
+
+So you can get a manifest for all images in the directory `/books/book1` with a URL like:
+
+ http://www.example.org/digilib/Manifester/IIIF/books!book1
+
+To try out a viewer on your manifest you can go to the website of the Universal Viewer [http://universalviewer.io/](http://universalviewer.io/) and enter the URL of your manifest in the "view a manifest" box on the page. This will work even with a local digilib installation since the Javascript in your Browser reads and interprets the manifest.