Mercurial > hg > digilib-old
comparison servlet/doc/Scaler.html @ 80:4d0e75042673
Docu update to match Scaler servlet version 1.6b.
author | robcast |
---|---|
date | Mon, 03 Feb 2003 17:00:28 +0100 |
parents | 0ff3ede32060 |
children | c7e6d92e7fd5 |
comparison
equal
deleted
inserted
replaced
79:63c8186455c1 | 80:4d0e75042673 |
---|---|
4 <TITLE>JBuilder Project ScaleServlet2.jpx</TITLE> | 4 <TITLE>JBuilder Project ScaleServlet2.jpx</TITLE> |
5 </HEAD> | 5 </HEAD> |
6 <BODY> | 6 <BODY> |
7 <H1>Scaler</H1> | 7 <H1>Scaler</H1> |
8 | 8 |
9 <p>A Servlet for scaling images.</p> | 9 <p>A Servlet for scaling images. (Version 1.6b)</p> |
10 | 10 |
11 <p>Scaler takes parameters in the http request format: | 11 <h2>Web API</h2> |
12 <code>Scaler/request_path/?param1=value1¶m2=value2&...</code></p> | 12 |
13 <p>The Scaler servlet takes parameters in the http request format: | |
14 <code>Scaler/request_path/?param1=value1¶m2=value2&...</code> | |
15 Unknown parameters will be silently ignored.</p> | |
13 | 16 |
14 <p>Recognised parameters: | 17 <p>Recognised parameters: |
15 <ul> | 18 <ul> |
16 <li><b>request_path</b> path to file or directory. | 19 <li><b>request_path</b> path to file or directory.</li> |
17 | 20 |
18 <li><b>fn</b> path to file or directory below <code>/docuserver/images</code>. | 21 <li><b>fn</b> path to file or directory below <code>/docuserver/images</code> |
22 (or other configured image directory). | |
19 This path will be added to the <code>request_path</code> behind the servlet name. | 23 This path will be added to the <code>request_path</code> behind the servlet name. |
20 Either parameter can be empty. | 24 Either parameter can be empty.</li> |
21 | 25 |
22 <li><b>pn</b> page number. Index into the (alphabetically sorted) directory | 26 <li><b>pn</b> page number. Index into the (alphabetically sorted) directory |
23 given by the path. Starts with 1. Ignored if the path points to a file. | 27 given by the path. Starts with 1. Ignored if the path points to a file. |
24 Default: 1. | 28 Default: 1.</li> |
25 | 29 |
26 <li><b>dw</b> destination image width (pixels). | 30 <li><b>dw</b> destination image width (pixels).</li> |
27 <li><b>dh</b> destination image height. | 31 |
32 <li><b>dh</b> destination image height (pixels).</li> | |
28 | 33 |
29 <li><b>wx</b> relative x offset of the image area to be sent (0 <= wx <= 1). | 34 <li><b>wx</b> relative x offset of the image area to be sent (0 <= wx <= 1). |
30 Default: 0. | 35 Default: 0.</li> |
31 <li><b>wy</b> relative y offset of the image area to be sent. | 36 |
32 Default: 0. | 37 <li><b>wy</b> relative y offset of the image area to be sent (0 <= wy <= 1). |
33 <li><b>ww</b> relative width of the image area to be sent. | 38 Default: 0.</li> |
34 Default: 1. | 39 |
35 <li><b>wh</b> relative height of the image area to be sent. | 40 <li><b>ww</b> relative width of the image area to be sent (0 <= ww <= 1). |
36 Default: 1. | 41 Default: 1.</li> |
42 | |
43 <li><b>wh</b> relative height of the image area to be sent (0 <= wh <= 1). | |
44 Default: 1.</li> | |
37 | 45 |
38 <li><b>ws</b> additional scaling factor. The resulting image will have the size | 46 <li><b>ws</b> additional scaling factor. The resulting image will have the size |
39 <code>[ws*dw,ws*dh]</code>. Default: 1. | 47 <code>[ws*dw,ws*dh]</code>. Default: 1.</li> |
40 | 48 |
41 <li><b>mo</b> flags for the mode of operation separated by "+". | 49 <li><b>mo</b> flags for the mode of operation separated by "+". |
42 <ul> | 50 <ul> |
43 <li><b>fit</b>: always scale the image to fit <code>[dw,dh]</code>.<br> | 51 <li><b>fit</b>: always scale the image to fit |
44 <b>file</b>: send the file as-is (may be very large and all sorts of image types!).<br> | 52 <code>[dw,dh]</code>.<br> <b>file</b>: send the file as-is (may |
45 If none of these flags is set heuristics is used (send unzoomed GIF as-is). | 53 be very large and all sorts of image types!). If configuration |
46 | 54 doesn't allow sending files |
55 (<code>sendfile-allowed=false</code>) revert to | |
56 <code>clip</code>.<br> <b>clip</b>: send the file in its | |
57 original resolution, cropped to fit <code>[dw,dh]</code>.<br> If | |
58 none of these flags is set heuristics is used (send unzoomed GIF | |
59 as-is).</li> | |
60 | |
47 <li><b>errtxt</b>: send error response as HTML.<br> | 61 <li><b>errtxt</b>: send error response as HTML.<br> |
48 <b>errimg</b>: response as image (default). | 62 <b>errimg</b>: response as image (default).</li> |
49 | 63 |
50 <li><b>q0</b>-<b>q2</b>: quality of interpolation in scaling | 64 <li><b>q0</b>-<b>q2</b>: quality of interpolation in scaling |
51 (<code>q0</code>: worst, default). | 65 (<code>q0</code>: worst, default).</li> |
52 | 66 |
53 <li><b>lores</b>: try to use scaled image (default)<br> | 67 <li><b>lores</b>: try to use scaled image (default)<br> |
54 <b>hires</b>: always use unscaled image.<br> | 68 <b>hires</b>: always use unscaled image.<br> |
55 If the image is zoomed (ww, wh < 1) the unscaled image is used in any case. | 69 If the image is zoomed (ww, wh < 1) the unscaled image is |
70 used in any case.</li> | |
71 | |
72 <li><b>vmir</b>: mirror image vertically.<br> | |
73 <b>hmir</b>: mirror image horizontally.</li> | |
56 </ul> | 74 </ul> |
75 </li> | |
57 | 76 |
77 <li><b>cont</b>: change contrast of the image. Negative value | |
78 reduces contrast, positive value enhances contrast. Pixel value is | |
79 multiplied by 2^cont.</li> | |
80 | |
81 <li><b>brgt</b>: change brightness of image. Negative value reduces | |
82 brightness, positive value enhances brightness. Pixel value is added | |
83 brgt.</li> | |
84 | |
85 <li><b>rot</b>: rotate image. Rotation angle is given in degrees.</li> | |
86 | |
58 </ul> | 87 </ul> |
59 The image will be scaled equally in horizontal and vertical direction such that | 88 The image will be scaled equally in horizontal and vertical direction such that |
60 the resulting image does not exceed the rectangle <code>[ww,wh]</code>. | 89 the resulting image does not exceed the rectangle <code>[ww,wh]</code>. |
61 </p> | 90 </p> |
62 | 91 |