Mercurial > hg > digilib
annotate doc/src/site/markdown/digilib-short.md @ 1655:7310735dd5b5
Refactoring of the configuration docs
author | Frank Sachsenheim <funkyfuture@riseup.net> |
---|---|
date | Thu, 17 Aug 2017 16:20:23 +0200 |
parents | 7770ac493446 |
children |
rev | line source |
---|---|
1273 | 1 # A short introduction to digilib |
2 | |
3 ## digilib -- how does it work? | |
4 | |
5 The image server digilib is a state-less web-based client-server | |
6 application for interactive viewing and manipulation of images. | |
7 | |
8 ## Frontend and Scaler server | |
9 | |
10 digilib consists mainly of two parts, the image server component proper, | |
11 called "Scaler" and a client-side part that runs in the users web | |
12 browser. | |
13 | |
14  | |
15 | |
16 The users browser sends an HTTP request for a certain (zoomed, scaled, | |
17 rotated) image to the Scaler server and the server returns the image | |
18 data as HTTP response. | |
19 | |
20 To complete the schematics of figure 1 we must also take into account | |
21 that the client-side part consisting of HTML and Javascript code has | |
22 also been requested and loaded from a frontend-web server into the users | |
23 browser. | |
24 | |
25  | |
26 | |
27 To date there are several frontend implementations for digilib like the | |
28 current "jquery" version that only requires static HTML and Javascript and the | |
29 older "greyskin" version (grey buttons, implemented in JSP) that come with | |
30 the default [digilib distribution][1] or the "[Zogilib][2]" frontend version | |
31 implemented in ZOPE. | |
32 | |
33 The frontend-server and the Scaler-server do not have to run | |
34 on the same machine and often there are several frontends that use the | |
35 same Scaler server. | |
36 | |
37 ### Request formats | |
38 | |
39 The format of the HTTP requests for the frontend and the | |
40 Scaler server can be completely different. The HTML and Javascript code | |
41 of the frontend just has to generate the correct request for the Scaler | |
42 to produce the desired image. Most of the current frontend implementations | |
43 share some or all of the parameters with the Scaler API. | |
44 | |
45 ### Scaler | |
46 | |
1279
828b6c8b1b19
changed links in documentation (and poms) to new sourceforge site.
robcast
parents:
1273
diff
changeset
|
47 The [Scaler API](scaler-api.html) is documented on the digilib.sourceforge.net |
1273 | 48 pages. Here is a minimal version: |
49 | |
50 The Scaler servlet takes parameters in the HTTP request format: | |
1402 | 51 `Scaler?param1=value1¶m2=value2&...` Unknown parameters |
1273 | 52 will be silently ignored. |
53 | |
54 Recognised parameters: | |
55 | |
1402 | 56 - `fn` path to file or directory. All paths are relative to the configured base directory |
1273 | 57 (digilib-config parameter `basedir-list`). |
58 - `pn` page number. Index into the (alphabetically sorted) | |
59 directory given by the path. Starts with 1. Ignored if the path | |
60 points to a file. Default: 1. | |
61 - `dw` destination image width (pixels). If omitted the image is | |
62 scaled to fit `dh.` | |
63 - `dh` destination image height (pixels). If omitted the image | |
64 is scaled to fit `dw`. | |
65 - `wx` relative x offset of the image area to be sent (0 <= | |
66 `wx` <= 1). Default: 0. | |
67 - `wy` relative y offset of the image area to be sent (0 <= | |
68 `wy` <= 1). Default: 0. | |
69 - `ww` relative width of the image area to be sent (0 <= `ww` | |
70 <= 1). Default: 1. | |
71 - `wh` relative height of the image area to be sent (0 <= `wh` | |
72 <= 1). Default: 1. | |
1402 | 73 - The image to be loaded can be specified by `fn` parameter and the optional |
1273 | 74 index `pn` |
75 - if `fn` points to a directory then the file with the index `pn` | |
76 (in alphabetical order according to ASCII) will be loaded | |
77 - if `fn` points to a file (with or without extension) then this | |
78 file will be loaded | |
79 | |
80 The image will be scaled equally in horizontal and vertical direction | |
81 such that the resulting image does not exceed the rectangle [`dw`,`dh`]. | |
82 If only either height or width is given the image is scaled to match | |
83 only the given parameter. The size of the resulting image in the other | |
84 parameter is determined by the aspect ratio of the image. | |
85 | |
86 An example for a Scaler URL is: | |
1402 | 87 `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` |
1273 | 88 such a URL can be used as src attribute to an img element in the |
89 frontend HTML. | |
90 | |
1279
828b6c8b1b19
changed links in documentation (and poms) to new sourceforge site.
robcast
parents:
1273
diff
changeset
|
91 [1]: https://sourceforge.net/p/digilib/code/ci/default/tree/webapp/src/main/webapp |
1273 | 92 |
93 [2]: http://itgroup.mpiwg-berlin.mpg.de/cgi-bin/cvsweb.cgi/zogiLib/ |