Package digilib.conf

Enum DigilibOption

java.lang.Object
java.lang.Enum<DigilibOption>
digilib.conf.DigilibOption
All Implemented Interfaces:
Serializable, Comparable<DigilibOption>, java.lang.constant.Constable

public enum DigilibOption extends Enum<DigilibOption>
Enum of options for the digilib "mo" parameter.
Author:
casties
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    scale the highest resolution image by an absolute factor given by the scale parameter.
    use the pre-scaled image that is bigger than the requested size (default).
    send the file in the highest resolution, cropped to fit [dw x dh].
    scale the (selected area of the) image proportionally to fill [dw x dh] with the shorter side, cropping the longer side.
    disallow upscaling in IIIF V3
    dirInfo returns directory contents
    send error response as HTTP status code.
    send error response as image (default).
    send error response as plain text.
    send the file as-is (may be very large and all sorts of image types!).
    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.
    scale the (selected area of the) image proportionally to fit inside [dw x dh], preserving its aspect ratio (default).
    only use the highest resolution image.
    mirror image horizontally.
    send IIIF image info (instead of image).
    the resulting image is always sent as JPEG (otherwise TIFF and PNG images are sent as PNG).
    prefer the next-smaller pre-scaled image.
    scale to original size based on image resolution (from the image metadata) and display resolution (from parameter ddpi).
    the resulting image is always sent as PNG (otherwise JPEG and J2K images are sent as JPEG).
    interpret wx, wy, ww, wh as pixel coordinates on the highest resolution image.
    quality of interpolation in scaling (q0: worst, q3 best).
    quality of interpolation in scaling (q0: worst, q3 best).
    quality of interpolation in scaling (q0: worst, q3 best).
    quality of interpolation in scaling (q0: worst, q3 best).
    send the file as-is with a mime-type of "application/octet-stream" so the browser presents a download dialog.
    send redirect to IIIF image info URI
    select square image region from the full image (short side of the image)^2.
    scale the (selected area of the) image to fill [dw x dh], changing its aspect ratio.
    mirror image vertically.
    the resulting image is always sent as webp
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    static DigilibOption[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • fit

      public static final DigilibOption fit
      scale the (selected area of the) image proportionally to fit inside [dw x dh], preserving its aspect ratio (default).
    • squeeze

      public static final DigilibOption squeeze
      scale the (selected area of the) image to fill [dw x dh], changing its aspect ratio.
    • crop

      public static final DigilibOption crop
      scale the (selected area of the) image proportionally to fill [dw x dh] with the shorter side, cropping the longer side.
    • fill

      public static final DigilibOption 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.
    • clip

      public static final DigilibOption clip
      send the file in the highest resolution, cropped to fit [dw x dh].
    • osize

      public static final DigilibOption osize
      scale to original size based on image resolution (from the image metadata) and display resolution (from parameter ddpi). Fails if either resolution is unknown.
    • ascale

      public static final DigilibOption ascale
      scale the highest resolution image by an absolute factor given by the scale parameter.
    • file

      public static final DigilibOption file
      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.
    • rawfile

      public static final DigilibOption rawfile
      send the file as-is with a mime-type of "application/octet-stream" so the browser presents a download dialog.
    • errtxt

      public static final DigilibOption errtxt
      send error response as plain text.
    • errimg

      public static final DigilibOption errimg
      send error response as image (default).
    • errcode

      public static final DigilibOption errcode
      send error response as HTTP status code.
    • q0

      public static final DigilibOption q0
      quality of interpolation in scaling (q0: worst, q3 best).
    • q1

      public static final DigilibOption q1
      quality of interpolation in scaling (q0: worst, q3 best).
    • q2

      public static final DigilibOption q2
      quality of interpolation in scaling (q0: worst, q3 best).
    • q3

      public static final DigilibOption q3
      quality of interpolation in scaling (q0: worst, q3 best).
    • hires

      public static final DigilibOption hires
      only use the highest resolution image.
    • autores

      public static final DigilibOption autores
      use the pre-scaled image that is bigger than the requested size (default).
    • lores

      public static final DigilibOption lores
      prefer the next-smaller pre-scaled image.
    • vmir

      public static final DigilibOption vmir
      mirror image vertically.
    • hmir

      public static final DigilibOption hmir
      mirror image horizontally.
    • jpg

      public static final DigilibOption jpg
      the resulting image is always sent as JPEG (otherwise TIFF and PNG images are sent as PNG).
    • png

      public static final DigilibOption png
      the resulting image is always sent as PNG (otherwise JPEG and J2K images are sent as JPEG).
    • webp

      public static final DigilibOption webp
      the resulting image is always sent as webp
    • pxarea

      public static final DigilibOption pxarea
      interpret wx, wy, ww, wh as pixel coordinates on the highest resolution image.
    • sqarea

      public static final DigilibOption sqarea
      select square image region from the full image (short side of the image)^2.
    • info

      public static final DigilibOption info
      send IIIF image info (instead of image).
    • redirect_info

      public static final DigilibOption redirect_info
      send redirect to IIIF image info URI
    • dir

      public static final DigilibOption dir
      dirInfo returns directory contents
    • deny_upscale

      public static final DigilibOption deny_upscale
      disallow upscaling in IIIF V3
  • Method Details

    • values

      public static DigilibOption[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DigilibOption valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null