Mercurial > hg > digilib
changeset 1593:4ef25f916df8
cleanup and site doc.
author | robcast |
---|---|
date | Wed, 08 Feb 2017 20:24:42 +0100 |
parents | 7031524fc6e9 |
children | 8692bf03d7cd |
files | common/src/main/java/digilib/conf/DigilibConfiguration.java common/src/main/java/digilib/conf/DigilibOption.java common/src/main/java/digilib/conf/DigilibRequest.java doc/src/site/markdown/index.md doc/src/site/markdown/scaler-api.md |
diffstat | 5 files changed, 104 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/common/src/main/java/digilib/conf/DigilibConfiguration.java Wed Feb 08 19:22:57 2017 +0100 +++ b/common/src/main/java/digilib/conf/DigilibConfiguration.java Wed Feb 08 20:24:42 2017 +0100 @@ -57,7 +57,7 @@ /** digilib version */ public static String getClassVersion() { - return "2.4.1a"; + return "2.5.0a"; } /* non-static getVersion for Java inheritance */
--- a/common/src/main/java/digilib/conf/DigilibOption.java Wed Feb 08 19:22:57 2017 +0100 +++ b/common/src/main/java/digilib/conf/DigilibOption.java Wed Feb 08 20:24:42 2017 +0100 @@ -7,57 +7,96 @@ * */ public enum DigilibOption { - /** scale the (selected area of the) image proportionally to fit inside [dw x dh], preserving its aspect ratio (default). */ - fit, - /** scale the (selected area of the) image to fill [dw x dh], changing its aspect ratio. */ - squeeze, - /** scale the (selected area of the) image proportionally to fill [dw x dh] with the shorter side, cropping the longer side. */ - crop, - /** scale the (selected area of the) image proportionally to fill [dw x dh] with the longer side, filling out the image on the shorter side if possible. */ - fill, - /** send the file in the highest resolution, cropped to fit [dw x dh]. */ - clip, - /** scale to original size based on image resolution (from the image metadata) and display resolution (from parameter ddpi). Fails if either resolution is unknown. */ - osize, - /** scale the highest resolution image by an absolute factor given by the scale parameter. */ - ascale, - /** send the file as-is (may be very large and all sorts of image types!). If the configuration doesn’t allow sending files (sendfile-allowed=false) revert to clip. */ - file, - /** send the file as-is with a mime-type of “application/octet-stream” so the browser presents a download dialog. */ - rawfile, - /** send error response as plain text. */ - errtxt, - /** send error response as image (default). */ - errimg, - /** send error response as HTTP status code. */ - errcode, - /** quality of interpolation in scaling (q0: worst, q2 best).*/ - q0, - /** quality of interpolation in scaling (q0: worst, q2 best).*/ - q1, - /** quality of interpolation in scaling (q0: worst, q2 best).*/ - q2, - /** only use the highest resolution image. */ - hires, - /** use the pre-scaled image that is bigger than the requested size (default). */ - autores, - /** prefer the next-smaller pre-scaled image. */ - lores, - /** mirror image vertically. */ - vmir, - /** mirror image horizontally. */ - hmir, - /** the resulting image is always sent as JPEG (otherwise TIFF and PNG images are sent as PNG). */ - jpg, - /** the resulting image is always sent as PNG (otherwise JPEG and J2K images are sent as JPEG). */ - png, - /** interpret wx, wy, ww, wh as pixel coordinates on the highest resolution image. */ - pxarea, - /** send IIIF image info (instead of image). */ - info, - /** send redirect to IIIF image info URI */ - redirect_info, - /** dirInfo returns directory contents */ - dir - + /** + * scale the (selected area of the) image proportionally to fit inside [dw x + * dh], preserving its aspect ratio (default). + */ + fit, + /** + * scale the (selected area of the) image to fill [dw x dh], changing its + * aspect ratio. + */ + squeeze, + /** + * scale the (selected area of the) image proportionally to fill [dw x dh] + * with the shorter side, cropping the longer side. + */ + crop, + /** + * scale the (selected area of the) image proportionally to fill [dw x dh] + * with the longer side, filling out the image on the shorter side if + * possible. + */ + fill, + /** send the file in the highest resolution, cropped to fit [dw x dh]. */ + clip, + /** + * scale to original size based on image resolution (from the image + * metadata) and display resolution (from parameter ddpi). Fails if either + * resolution is unknown. + */ + osize, + /** + * scale the highest resolution image by an absolute factor given by the + * scale parameter. + */ + ascale, + /** + * send the file as-is (may be very large and all sorts of image types!). If + * the configuration doesn’t allow sending files (sendfile-allowed=false) + * revert to clip. + */ + file, + /** + * send the file as-is with a mime-type of "application/octet-stream" so the + * browser presents a download dialog. + */ + rawfile, + /** send error response as plain text. */ + errtxt, + /** send error response as image (default). */ + errimg, + /** send error response as HTTP status code. */ + errcode, + /** quality of interpolation in scaling (q0: worst, q2 best). */ + q0, + /** quality of interpolation in scaling (q0: worst, q2 best). */ + q1, + /** quality of interpolation in scaling (q0: worst, q2 best). */ + q2, + /** only use the highest resolution image. */ + hires, + /** + * use the pre-scaled image that is bigger than the requested size + * (default). + */ + autores, + /** prefer the next-smaller pre-scaled image. */ + lores, + /** mirror image vertically. */ + vmir, + /** mirror image horizontally. */ + hmir, + /** + * the resulting image is always sent as JPEG (otherwise TIFF and PNG images + * are sent as PNG). + */ + jpg, + /** + * the resulting image is always sent as PNG (otherwise JPEG and J2K images + * are sent as JPEG). + */ + png, + /** + * interpret wx, wy, ww, wh as pixel coordinates on the highest resolution + * image. + */ + pxarea, + /** send IIIF image info (instead of image). */ + info, + /** send redirect to IIIF image info URI */ + redirect_info, + /** dirInfo returns directory contents */ + dir + }
--- a/common/src/main/java/digilib/conf/DigilibRequest.java Wed Feb 08 19:22:57 2017 +0100 +++ b/common/src/main/java/digilib/conf/DigilibRequest.java Wed Feb 08 20:24:42 2017 +0100 @@ -55,7 +55,7 @@ * wh: height of image area(float from 0 to 1). <br> * ws: scale factor. <br> * mo: special options like 'fit'. <br> - * ...et al + * ...et cetera * * @author casties *
--- a/doc/src/site/markdown/index.md Wed Feb 08 19:22:57 2017 +0100 +++ b/doc/src/site/markdown/index.md Wed Feb 08 20:24:42 2017 +0100 @@ -16,7 +16,7 @@ novel uses of source material by image annotations and stable references that can be embedded in URLs. * `digilib` facilitates federation of image servers through a standards compliant - [IIIF](http://iiif.io) image API. + [IIIF](http://iiif.io) Image API. * `digilib` is Open Source Software under the Lesser General Public License, jointly developed by the [Max Planck Institute for the History of Science](http://www.mpiwg-berlin.mpg.de),
--- a/doc/src/site/markdown/scaler-api.md Wed Feb 08 19:22:57 2017 +0100 +++ b/doc/src/site/markdown/scaler-api.md Wed Feb 08 20:24:42 2017 +0100 @@ -6,9 +6,10 @@ Unknown parameters will be silently ignored. -Recognised parameters (as of Version 2.3.7, for the most recent list of -parameters -[use the source](https://sourceforge.net/p/digilib/code/ci/default/tree/servlet/src/main/java/digilib/conf/DigilibServletRequest.java) +Recognised parameters (as of Version 2.5.0, for the most up to date information use the source for +[parameters](https://sourceforge.net/p/digilib/code/ci/default/tree/servlet/src/main/java/digilib/conf/DigilibServletRequest.java) +and +[mode options](https://sourceforge.net/p/digilib/code/ci/default/tree/common/src/main/java/digilib/conf/DigilibOption.java) ): - `request_path`: (optional) path to file or directory. @@ -64,9 +65,11 @@ - `BITONAL` (produces black-and-white image) - `INVERT` (inverts colors) - `MAP_GRAY_BGR` (produces false-color image mapping brightness values to color scale from blue via green to red). -- `mo`: list of flags for the mode of operation separated by comma ",". - - `fit`: scale the image proportionally to fit inside \[`dw` x `dh`\], preserving its aspect ratio (default). - - `squeeze`: scale the image to fit \[`dw` x `dh`\], changing its aspect ratio. +- `mo`: list of options for the mode of operation separated by comma ",". + - `fit`: scale the (selected area of the) image proportionally to fit inside [dw x dh], preserving its aspect ratio (default). + - `squeeze`: scale the (selected area of the) image to fill [dw x dh], changing its aspect ratio (since v2.3.3). + - `crop`: scale the (selected area of the) image proportionally to fill [dw x dh] with the shorter side, cropping the longer side (since v2.5). + - `fill`: scale the (selected area of the) image proportionally to fill [dw x dh] with the longer side, filling out the image on the shorter side if possible (since v2.3.3). - `clip`: send the file in the highest resolution, cropped to fit \[`dw` x `dh`\]. - `osize`: scale to original size based on image