Mercurial > hg > digilib
comparison doc/src/site/markdown/scaler-api.md @ 1462:71cd204862d4
document new parameters.
author | robcast |
---|---|
date | Fri, 13 Nov 2015 18:29:54 +0100 |
parents | bd333826fb7a |
children | 4ef25f916df8 |
comparison
equal
deleted
inserted
replaced
1458:1616ea719290 | 1462:71cd204862d4 |
---|---|
4 | 4 |
5 http://host.domain/digilib/Scaler/request_path/?param1=value1¶m2=value2&... | 5 http://host.domain/digilib/Scaler/request_path/?param1=value1¶m2=value2&... |
6 | 6 |
7 Unknown parameters will be silently ignored. | 7 Unknown parameters will be silently ignored. |
8 | 8 |
9 Recognised parameters (as of Version 2.2.2, for the most recent list of | 9 Recognised parameters (as of Version 2.3.7, for the most recent list of |
10 parameters | 10 parameters |
11 [use the source](https://sourceforge.net/p/digilib/code/ci/default/tree/servlet/src/main/java/digilib/conf/DigilibServletRequest.java) | 11 [use the source](https://sourceforge.net/p/digilib/code/ci/default/tree/servlet/src/main/java/digilib/conf/DigilibServletRequest.java) |
12 ): | 12 ): |
13 | 13 |
14 - `request_path`: (optional) path to file or directory. | 14 - `request_path`: (optional) path to file or directory. |
56 `osize` mode. | 56 `osize` mode. |
57 - `ddpiy`: resolution of client display in y direction for | 57 - `ddpiy`: resolution of client display in y direction for |
58 `osize` mode. | 58 `osize` mode. |
59 - `scale`: absolute scale factor applied to the highest resolution image | 59 - `scale`: absolute scale factor applied to the highest resolution image |
60 for `ascale` mode. | 60 for `ascale` mode. |
61 - `colop`: color operation. One of "GRAYSCALE" (produces grayscale | 61 - `colop`: color operation. One of |
62 image), "NTSC\_GRAY" (uses NTSC formula to produce grayscale image), | 62 - `GRAYSCALE` (produces grayscale image) |
63 "INVERT" (inverts colors), "MAP\_GRAY\_BGR" (produces false-color image | 63 - `NTSC_GRAY` (uses NTSC formula to produce grayscale image) |
64 mapping brightness values to color scale from blue via green to red). | 64 - `BITONAL` (produces black-and-white image) |
65 - `INVERT` (inverts colors) | |
66 - `MAP_GRAY_BGR` (produces false-color image mapping brightness values to color scale from blue via green to red). | |
65 - `mo`: list of flags for the mode of operation separated by comma ",". | 67 - `mo`: list of flags for the mode of operation separated by comma ",". |
66 - `fit`: always scale the image to fit \[`dw` x `dh`\] (default). | 68 - `fit`: scale the image proportionally to fit inside \[`dw` x `dh`\], preserving its aspect ratio (default). |
67 - `clip`: send the file in its original resolution, cropped | 69 - `squeeze`: scale the image to fit \[`dw` x `dh`\], changing its aspect ratio. |
70 - `clip`: send the file in the highest resolution, cropped | |
68 to fit \[`dw` x `dh`\]. | 71 to fit \[`dw` x `dh`\]. |
69 - `osize`: scale to original size based on image | 72 - `osize`: scale to original size based on image |
70 resolution (from the image metadata) and display resolution | 73 resolution (from the image metadata) and display resolution |
71 (from parameter ddpi). Fails if either resolution is unknown. | 74 (from parameter ddpi). Fails if either resolution is unknown. |
72 - `ascale`: scale the highest resolution image by an absolute | 75 - `ascale`: scale the highest resolution image by an absolute |
79 - `errtxt`: send error response as plain text. | 82 - `errtxt`: send error response as plain text. |
80 - `errimg`: send error response as image (default). | 83 - `errimg`: send error response as image (default). |
81 - `errcode`: send error response as HTTP status code. | 84 - `errcode`: send error response as HTTP status code. |
82 - `q0`-`q2`: quality of interpolation in scaling (q0: | 85 - `q0`-`q2`: quality of interpolation in scaling (q0: |
83 worst, q2 best). | 86 worst, q2 best). |
84 - `lores`: try to use pre-scaled images (default) | |
85 - `hires`: only use the highest resolution image. | 87 - `hires`: only use the highest resolution image. |
88 - `autores`: use the pre-scaled image that is bigger than the requested size (default). | |
89 - `lores`: prefer the next-smaller pre-scaled image. | |
86 - `vmir`: mirror image vertically. | 90 - `vmir`: mirror image vertically. |
87 - `hmir`: mirror image horizontally. | 91 - `hmir`: mirror image horizontally. |
88 - `jpg`: the resulting image is always sent as JPEG | 92 - `jpg`: the resulting image is always sent as JPEG |
89 (otherwise TIFF and PNG images are sent as PNG). | 93 (otherwise TIFF and PNG images are sent as PNG). |
90 - `png`: the resulting image is always sent as PNG | 94 - `png`: the resulting image is always sent as PNG |
91 (otherwise JPEG and J2K images are sent as JPEG). | 95 (otherwise JPEG and J2K images are sent as JPEG). |
96 - `pxarea`: interpret `wx`, `wy`, `ww`, `wh` as pixel coordinates on the highest resolution image. | |
92 | 97 |
93 The image to be loaded is specified by the `request_path` | 98 The image to be loaded is specified by the `request_path` |
94 (deprecated) and/or the `fn` parameter (preferred) and the optional | 99 (deprecated) and/or the `fn` parameter (preferred) and the optional |
95 index `pn`: | 100 index `pn`: |
96 | 101 |
100 file will be loaded (regardless of `pn`). | 105 file will be loaded (regardless of `pn`). |
101 | 106 |
102 Find more information on the directory layout [here](image-directories.html). | 107 Find more information on the directory layout [here](image-directories.html). |
103 | 108 |
104 The image will always be scaled equally in horizontal and vertical direction, | 109 The image will always be scaled equally in horizontal and vertical direction, |
105 preserving the aspect ratio, | 110 preserving the aspect ratio (except with `mo=squeeze`), |
106 such that the resulting image does not exceed the rectangle \[`dw` x `dh`\]. | 111 such that the resulting image does not exceed the rectangle \[`dw` x `dh`\]. |
107 | 112 |
108 If only either height or width is given the image is scaled to match | 113 If only either height or width is given the image is scaled to match |
109 only the given dimension. The size of the resulting image in the other | 114 only the given dimension. The size of the resulting image in the other |
110 dimension is determined by the aspect ratio of the image. | 115 dimension is determined by the aspect ratio of the image or the selected area. |