# HG changeset patch
# User robcast
# Date 1044288028 -3600
# Node ID 4d0e75042673c395386da1fcb658ffde67508078
# Parent 63c8186455c133aff41d46075078b01fe8af712a
Docu update to match Scaler servlet version 1.6b.
diff -r 63c8186455c1 -r 4d0e75042673 servlet/doc/Scaler.html
--- a/servlet/doc/Scaler.html Mon Feb 03 16:04:53 2003 +0100
+++ b/servlet/doc/Scaler.html Mon Feb 03 17:00:28 2003 +0100
@@ -6,55 +6,84 @@
Scaler
-A Servlet for scaling images.
+A Servlet for scaling images. (Version 1.6b)
+
+Web API
-Scaler takes parameters in the http request format:
-Scaler/request_path/?param1=value1¶m2=value2&...
+The Scaler servlet takes parameters in the http request format:
+Scaler/request_path/?param1=value1¶m2=value2&...
+Unknown parameters will be silently ignored.
Recognised parameters:
- - request_path path to file or directory.
+
- request_path path to file or directory.
- - fn path to file or directory below
/docuserver/images
.
+ - fn path to file or directory below
/docuserver/images
+ (or other configured image directory).
This path will be added to the request_path
behind the servlet name.
- Either parameter can be empty.
+ Either parameter can be empty.
- pn page number. Index into the (alphabetically sorted) directory
given by the path. Starts with 1. Ignored if the path points to a file.
- Default: 1.
+ Default: 1.
- - dw destination image width (pixels).
-
- dh destination image height.
+
- dw destination image width (pixels).
+
+ - dh destination image height (pixels).
- wx relative x offset of the image area to be sent (0 <= wx <= 1).
- Default: 0.
-
- wy relative y offset of the image area to be sent.
- Default: 0.
-
- ww relative width of the image area to be sent.
- Default: 1.
-
- wh relative height of the image area to be sent.
- Default: 1.
+ Default: 0.
+
+ - wy relative y offset of the image area to be sent (0 <= wy <= 1).
+ Default: 0.
+
+ - ww relative width of the image area to be sent (0 <= ww <= 1).
+ Default: 1.
+
+ - wh relative height of the image area to be sent (0 <= wh <= 1).
+ Default: 1.
- ws additional scaling factor. The resulting image will have the size
-
[ws*dw,ws*dh]
. Default: 1.
+ [ws*dw,ws*dh]
. Default: 1.
- - mo flags for the mode of operation separated by "+".
+
- mo flags for the mode of operation separated by "+".
- - fit: always scale the image to fit
[dw,dh]
.
- file: send the file as-is (may be very large and all sorts of image types!).
- If none of these flags is set heuristics is used (send unzoomed GIF as-is).
-
+ - fit: always scale the image to fit
+
[dw,dh]
.
file: send the file as-is (may
+ be very large and all sorts of image types!). If configuration
+ doesn't allow sending files
+ (sendfile-allowed=false
) revert to
+ clip
.
clip: send the file in its
+ original resolution, cropped to fit [dw,dh]
.
If
+ none of these flags is set heuristics is used (send unzoomed GIF
+ as-is).
+
- errtxt: send error response as HTML.
- errimg: response as image (default).
+ errimg: response as image (default).
- q0-q2: quality of interpolation in scaling
- (
q0
: worst, default).
+ (q0
: worst, default).
- lores: try to use scaled image (default)
- hires: always use unscaled image.
- If the image is zoomed (ww, wh < 1) the unscaled image is used in any case.
+ hires: always use unscaled image.
+ If the image is zoomed (ww, wh < 1) the unscaled image is
+ used in any case.
+
+ - vmir: mirror image vertically.
+ hmir: mirror image horizontally.
+
+ - cont: change contrast of the image. Negative value
+ reduces contrast, positive value enhances contrast. Pixel value is
+ multiplied by 2^cont.
+
+ - brgt: change brightness of image. Negative value reduces
+ brightness, positive value enhances brightness. Pixel value is added
+ brgt.
+
+ - rot: rotate image. Rotation angle is given in degrees.
+
The image will be scaled equally in horizontal and vertical direction such that
the resulting image does not exceed the rectangle [ww,wh]
.