Mercurial > hg > digilib-old
comparison servlet/doc/Scaler.html @ 327:c9b2938861cf
updated doc
author | robcast |
---|---|
date | Tue, 02 Nov 2004 14:31:58 +0100 |
parents | 250f3b8762e4 |
children |
comparison
equal
deleted
inserted
replaced
326:665f2f4559d0 | 327:c9b2938861cf |
---|---|
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> | 1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> | 4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
5 <TITLE>Scaler servlet</TITLE> | 5 <title>Scaler servlet</title> |
6 </head> | 6 </head> |
7 <BODY> | 7 <body> |
8 <H1>Scaler</H1> | 8 <h1>Scaler</h1> |
9 | 9 |
10 <p>A Servlet for scaling images. (Version 1.16b2)</p> | 10 <p>A Servlet for scaling images. (Version 1.5.2)</p> |
11 | 11 |
12 <h2>Web API</h2> | 12 <h2>Web API</h2> |
13 | 13 |
14 <p>The Scaler servlet takes parameters in the http request format: | 14 <p>The Scaler servlet takes parameters in the http request format: |
15 <code>Scaler/request_path/?param1=value1¶m2=value2&...</code> | 15 <code>Scaler/request_path/?param1=value1&param2=value2&...</code> |
16 Unknown parameters will be silently ignored.</p> | 16 Unknown parameters will be silently ignored.</p> |
17 | 17 |
18 <p>Recognised parameters:</p> | 18 <p>Recognised parameters:</p> |
19 <ul> | 19 <ul> |
20 <li><b>request_path</b> path to file or directory.</li> | 20 <li><b>request_path</b> path to file or directory.</li> |
50 <code>[ws*dw,ws*dh]</code>. Default: 1.</li> | 50 <code>[ws*dw,ws*dh]</code>. Default: 1.</li> |
51 | 51 |
52 <li><b>mo</b> flags for the mode of operation separated by ",". | 52 <li><b>mo</b> flags for the mode of operation separated by ",". |
53 <ul> | 53 <ul> |
54 <li><b>fit</b>: always scale the image to fit | 54 <li><b>fit</b>: always scale the image to fit |
55 <code>[dw,dh]</code>.<br> | 55 <code>[dw,dh]</code> (default).<br> |
56 | |
57 <b>clip</b>: send the file in its | |
58 original resolution, cropped to fit <code>[dw,dh]</code>. | |
59 <br> | |
56 | 60 |
61 <b>osize</b>: scale to original size based on the image resolution | |
62 (from the image metadata) and display resolution (from parameter | |
63 <code>ddpi</code>). Fails if either resolution is unknown. | |
64 </li> | |
65 | |
66 <li> | |
57 <b>file</b>: send the file as-is (may | 67 <b>file</b>: send the file as-is (may |
58 be very large and all sorts of image types!). If configuration | 68 be very large and all sorts of image types!). If configuration |
59 doesn't allow sending files | 69 doesn't allow sending files |
60 (<code>sendfile-allowed=false</code>) revert to | 70 (<code>sendfile-allowed=false</code>) revert to |
61 <code>clip</code>.<br> | 71 <code>clip</code>.<br> |
62 | 72 |
63 <b>rawfile</b>: send the file as-is with a mime-type of | 73 <b>rawfile</b>: send the file as-is with a mime-type of |
64 <code>application/octet-stream</code> so it can be downloaded with | 74 <code>application/octet-stream</code> so it can be downloaded with |
65 the browser.<br> | 75 the browser. |
66 | |
67 <b>clip</b>: send the file in its | |
68 original resolution, cropped to fit <code>[dw,dh]</code>.<br> If | |
69 none of these flags is set heuristics is used (send unzoomed GIF | |
70 as-is).<br> | |
71 | |
72 <b>osize</b>: scale to original size based on the image resolution | |
73 (from the image metadata) and display resolution (from parameter | |
74 <code>ddpi</code>). Fails if either resolution is unknown. | |
75 </li> | 76 </li> |
76 | 77 |
77 <li><b>errtxt</b>: send error response as HTML.<br> | 78 <li><b>errtxt</b>: send error response as HTML.<br> |
78 <b>errimg</b>: response as image (default).</li> | 79 <b>errimg</b>: response as image (default).</li> |
79 | 80 |
82 | 83 |
83 <li><b>lores</b>: try to use scaled image (default)<br> | 84 <li><b>lores</b>: try to use scaled image (default)<br> |
84 | 85 |
85 <b>hires</b>: always use unscaled image.<br> | 86 <b>hires</b>: always use unscaled image.<br> |
86 | 87 |
87 If the image is zoomed (ww, wh < 1) the unscaled image is | 88 If the image is zoomed (ww, wh < 1) the use of the scaled |
88 used in any case.</li> | 89 image files depends on the requested resolution.</li> |
89 | 90 |
90 <li><b>vmir</b>: mirror image vertically.<br> | 91 <li><b>vmir</b>: mirror image vertically.<br> |
91 | 92 |
92 <b>hmir</b>: mirror image horizontally.</li> | 93 <b>hmir</b>: mirror image horizontally.</li> |
94 | |
95 <li><b>jpg</b>: the resulting image is always sent as JPEG | |
96 (otherwise TIFF and PNG images are sent as PNG). | |
97 </li> | |
93 </ul> | 98 </ul> |
94 </li> | 99 </li> |
95 | 100 |
96 <li><b>cont</b>: change contrast of the image. Negative value | 101 <li><b>cont</b>: change contrast of the image. Negative value |
97 reduces contrast, positive value enhances contrast. Pixel value is | 102 reduces contrast, positive value enhances contrast. Pixel value is |
146 image is scaled to match only the given parameter. The size of the | 151 image is scaled to match only the given parameter. The size of the |
147 resulting image in the other parameter is determined by the aspect | 152 resulting image in the other parameter is determined by the aspect |
148 ratio of the image. | 153 ratio of the image. |
149 </p> | 154 </p> |
150 | 155 |
151 </BODY> | 156 </body> |
152 </html> | 157 </html> |