comparison servlet/doc/Scaler.html @ 1:0ff3ede32060

Initial revision
author robcast
date Thu, 17 Jan 2002 15:25:46 +0100
parents
children 4d0e75042673
comparison
equal deleted inserted replaced
0:ffd2df307e81 1:0ff3ede32060
1 <HTML>
2 <HEAD>
3 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
4 <TITLE>JBuilder Project ScaleServlet2.jpx</TITLE>
5 </HEAD>
6 <BODY>
7 <H1>Scaler</H1>
8
9 <p>A Servlet for scaling images.</p>
10
11 <p>Scaler takes parameters in the http request format:
12 <code>Scaler/request_path/?param1=value1&param2=value2&...</code></p>
13
14 <p>Recognised parameters:
15 <ul>
16 <li><b>request_path</b> path to file or directory.
17
18 <li><b>fn</b> path to file or directory below <code>/docuserver/images</code>.
19 This path will be added to the <code>request_path</code> behind the servlet name.
20 Either parameter can be empty.
21
22 <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.
24 Default: 1.
25
26 <li><b>dw</b> destination image width (pixels).
27 <li><b>dh</b> destination image height.
28
29 <li><b>wx</b> relative x offset of the image area to be sent (0 &lt;= wx &lt;= 1).
30 Default: 0.
31 <li><b>wy</b> relative y offset of the image area to be sent.
32 Default: 0.
33 <li><b>ww</b> relative width of the image area to be sent.
34 Default: 1.
35 <li><b>wh</b> relative height of the image area to be sent.
36 Default: 1.
37
38 <li><b>ws</b> additional scaling factor. The resulting image will have the size
39 <code>[ws*dw,ws*dh]</code>. Default: 1.
40
41 <li><b>mo</b> flags for the mode of operation separated by "+".
42 <ul>
43 <li><b>fit</b>: always scale the image to fit <code>[dw,dh]</code>.<br>
44 <b>file</b>: send the file as-is (may be very large and all sorts of image types!).<br>
45 If none of these flags is set heuristics is used (send unzoomed GIF as-is).
46
47 <li><b>errtxt</b>: send error response as HTML.<br>
48 <b>errimg</b>: response as image (default).
49
50 <li><b>q0</b>-<b>q2</b>: quality of interpolation in scaling
51 (<code>q0</code>: worst, default).
52
53 <li><b>lores</b>: try to use scaled image (default)<br>
54 <b>hires</b>: always use unscaled image.<br>
55 If the image is zoomed (ww, wh &lt; 1) the unscaled image is used in any case.
56 </ul>
57
58 </ul>
59 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>.
61 </p>
62
63 </BODY>
64 </HTML>