annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
1 <HTML>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
2 <HEAD>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
3 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
82
6f4c01ab13c4 Small doc update.
robcast
parents: 81
diff changeset
4 <TITLE>Scaler servlet</TITLE>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
5 </HEAD>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
6 <BODY>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
7 <H1>Scaler</H1>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
8
109
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
9 <p>A Servlet for scaling images. (Version 1.9b)</p>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
10
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
11 <h2>Web API</h2>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
12
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
13 <p>The Scaler servlet takes parameters in the http request format:
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
14 <code>Scaler/request_path/?param1=value1&param2=value2&...</code>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
15 Unknown parameters will be silently ignored.</p>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
16
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
17 <p>Recognised parameters:
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
18 <ul>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
19 <li><b>request_path</b> path to file or directory.</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
20
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
21 <li><b>fn</b> path to file or directory below <code>/docuserver/images</code>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
22 (or other configured image directory).
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
23 This path will be added to the <code>request_path</code> behind the servlet name.
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
24 Either parameter can be empty.</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
25
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
26 <li><b>pn</b> page number. Index into the (alphabetically sorted) directory
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
27 given by the path. Starts with 1. Ignored if the path points to a file.
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
28 Default: 1.</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
29
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
30 <li><b>dw</b> destination image width (pixels).</li>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
31
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
32 <li><b>dh</b> destination image height (pixels).</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
33
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
34 <li><b>wx</b> relative x offset of the image area to be sent (0 &lt;= wx &lt;= 1).
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
35 Default: 0.</li>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
36
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
37 <li><b>wy</b> relative y offset of the image area to be sent (0 &lt;= wy &lt;= 1).
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
38 Default: 0.</li>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
39
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
40 <li><b>ww</b> relative width of the image area to be sent (0 &lt;= ww &lt;= 1).
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
41 Default: 1.</li>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
42
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
43 <li><b>wh</b> relative height of the image area to be sent (0 &lt;= wh &lt;= 1).
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
44 Default: 1.</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
45
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
46 <li><b>ws</b> additional scaling factor. The resulting image will have the size
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
47 <code>[ws*dw,ws*dh]</code>. Default: 1.</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
48
109
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
49 <li><b>mo</b> flags for the mode of operation separated by ",".
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
50 <ul>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
51 <li><b>fit</b>: always scale the image to fit
109
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
52 <code>[dw,dh]</code>.<br>
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
53 <b>file</b>: send the file as-is (may
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
54 be very large and all sorts of image types!). If configuration
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
55 doesn't allow sending files
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
56 (<code>sendfile-allowed=false</code>) revert to
109
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
57 <code>clip</code>.<br>
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
58 <b>clip</b>: send the file in its
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
59 original resolution, cropped to fit <code>[dw,dh]</code>.<br> If
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
60 none of these flags is set heuristics is used (send unzoomed GIF
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
61 as-is).</li>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
62
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
63 <li><b>errtxt</b>: send error response as HTML.<br>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
64 <b>errimg</b>: response as image (default).</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
65
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
66 <li><b>q0</b>-<b>q2</b>: quality of interpolation in scaling
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
67 (<code>q0</code>: worst, default).</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
68
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
69 <li><b>lores</b>: try to use scaled image (default)<br>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
70 <b>hires</b>: always use unscaled image.<br>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
71 If the image is zoomed (ww, wh &lt; 1) the unscaled image is
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
72 used in any case.</li>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
73
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
74 <li><b>vmir</b>: mirror image vertically.<br>
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
75 <b>hmir</b>: mirror image horizontally.</li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
76 </ul>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
77 </li>
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
78
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
79 <li><b>cont</b>: change contrast of the image. Negative value
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
80 reduces contrast, positive value enhances contrast. Pixel value is
81
c7e6d92e7fd5 Small doc update.
robcast
parents: 80
diff changeset
81 multiplied by 2^cont. Default: 0</li>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
82
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
83 <li><b>brgt</b>: change brightness of image. Negative value reduces
109
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
84 brightness, positive value enhances brightness. The value brgt is
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
85 added to the pixel value. Default: 0</li>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
86
109
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
87 <li><b>rot</b>: rotate image. Rotation angle is given in
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
88 degrees. Default: 0</li>
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
89
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
90 <li><b>rgbm</b>: modify color by multiplication. The contrast of the
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
91 red green and blue components of the image can be reduced or
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
92 enhanced similar to the <code>cont</code> parameter. The factors for
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
93 red, green and blue are separated by slashes (for example
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
94 0.86/0/-0.5). Default: 0/0/0</li>
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
95
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
96 <li><b>rgba</b>: modify color by addition. The brightness of the red
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
97 green and blue components of the image can be reduced or enhanced
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
98 similar to the <code>brgt</code> parameter. The factors for red,
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
99 green and blue are separated by slashes (for example
200584e60a0b Updated with Version 1.9
robcast
parents: 82
diff changeset
100 100/0/25). Default: 0/0/0</li>
80
4d0e75042673 Docu update to match Scaler servlet version 1.6b.
robcast
parents: 1
diff changeset
101
1
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
102 </ul>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
103 The image will be scaled equally in horizontal and vertical direction such that
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
104 the resulting image does not exceed the rectangle <code>[ww,wh]</code>.
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
105 </p>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
106
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
107 </BODY>
0ff3ede32060 Initial revision
robcast
parents:
diff changeset
108 </HTML>