Mercurial > hg > digilib-old
comparison servlet/doc/Scaler.html @ 109:200584e60a0b
Updated with Version 1.9
author | robcast |
---|---|
date | Wed, 14 May 2003 00:11:15 +0200 |
parents | 6f4c01ab13c4 |
children | 737f5cd647e1 |
comparison
equal
deleted
inserted
replaced
108:ffc7d9138397 | 109:200584e60a0b |
---|---|
4 <TITLE>Scaler servlet</TITLE> | 4 <TITLE>Scaler servlet</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. (Version 1.6b)</p> | 9 <p>A Servlet for scaling images. (Version 1.9b)</p> |
10 | 10 |
11 <h2>Web API</h2> | 11 <h2>Web API</h2> |
12 | 12 |
13 <p>The Scaler servlet takes parameters in the http request format: | 13 <p>The Scaler servlet takes parameters in the http request format: |
14 <code>Scaler/request_path/?param1=value1¶m2=value2&...</code> | 14 <code>Scaler/request_path/?param1=value1¶m2=value2&...</code> |
44 Default: 1.</li> | 44 Default: 1.</li> |
45 | 45 |
46 <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 |
47 <code>[ws*dw,ws*dh]</code>. Default: 1.</li> | 47 <code>[ws*dw,ws*dh]</code>. Default: 1.</li> |
48 | 48 |
49 <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 ",". |
50 <ul> | 50 <ul> |
51 <li><b>fit</b>: always scale the image to fit | 51 <li><b>fit</b>: always scale the image to fit |
52 <code>[dw,dh]</code>.<br> <b>file</b>: send the file as-is (may | 52 <code>[dw,dh]</code>.<br> |
53 <b>file</b>: send the file as-is (may | |
53 be very large and all sorts of image types!). If configuration | 54 be very large and all sorts of image types!). If configuration |
54 doesn't allow sending files | 55 doesn't allow sending files |
55 (<code>sendfile-allowed=false</code>) revert to | 56 (<code>sendfile-allowed=false</code>) revert to |
56 <code>clip</code>.<br> <b>clip</b>: send the file in its | 57 <code>clip</code>.<br> |
58 <b>clip</b>: send the file in its | |
57 original resolution, cropped to fit <code>[dw,dh]</code>.<br> If | 59 original resolution, cropped to fit <code>[dw,dh]</code>.<br> If |
58 none of these flags is set heuristics is used (send unzoomed GIF | 60 none of these flags is set heuristics is used (send unzoomed GIF |
59 as-is).</li> | 61 as-is).</li> |
60 | 62 |
61 <li><b>errtxt</b>: send error response as HTML.<br> | 63 <li><b>errtxt</b>: send error response as HTML.<br> |
77 <li><b>cont</b>: change contrast of the image. Negative value | 79 <li><b>cont</b>: change contrast of the image. Negative value |
78 reduces contrast, positive value enhances contrast. Pixel value is | 80 reduces contrast, positive value enhances contrast. Pixel value is |
79 multiplied by 2^cont. Default: 0</li> | 81 multiplied by 2^cont. Default: 0</li> |
80 | 82 |
81 <li><b>brgt</b>: change brightness of image. Negative value reduces | 83 <li><b>brgt</b>: change brightness of image. Negative value reduces |
82 brightness, positive value enhances brightness. Pixel value is added | 84 brightness, positive value enhances brightness. The value brgt is |
83 brgt. Default: 0</li> | 85 added to the pixel value. Default: 0</li> |
84 | 86 |
85 <li><b>rot</b>: rotate image. Rotation angle is given in degrees. Default: 0</li> | 87 <li><b>rot</b>: rotate image. Rotation angle is given in |
88 degrees. Default: 0</li> | |
89 | |
90 <li><b>rgbm</b>: modify color by multiplication. The contrast of the | |
91 red green and blue components of the image can be reduced or | |
92 enhanced similar to the <code>cont</code> parameter. The factors for | |
93 red, green and blue are separated by slashes (for example | |
94 0.86/0/-0.5). Default: 0/0/0</li> | |
95 | |
96 <li><b>rgba</b>: modify color by addition. The brightness of the red | |
97 green and blue components of the image can be reduced or enhanced | |
98 similar to the <code>brgt</code> parameter. The factors for red, | |
99 green and blue are separated by slashes (for example | |
100 100/0/25). Default: 0/0/0</li> | |
86 | 101 |
87 </ul> | 102 </ul> |
88 The image will be scaled equally in horizontal and vertical direction such that | 103 The image will be scaled equally in horizontal and vertical direction such that |
89 the resulting image does not exceed the rectangle <code>[ww,wh]</code>. | 104 the resulting image does not exceed the rectangle <code>[ww,wh]</code>. |
90 </p> | 105 </p> |