public interface IiifParameterParserService
| Modifier and Type | Method and Description |
|---|---|
ImageFormat |
parseIiifFormat(String targetFormat)
Parse the target image format.
|
ImageBitDepth |
parseIiifQuality(String targetQuality)
Parse the quality parameter (determines whether the image is delivered in color, grayscale or black and white).
|
RegionParameters |
parseIiifRegion(String region)
The region parameter defines the rectangular portion of the full image to be returned.
|
RotationParameters |
parseIiifRotation(String rotation)
The rotation parameter specifies mirroring and rotation.
|
ResizeParameters |
parseIiifSize(String size)
Parses parameters for resizing.
|
ImageFormat parseIiifFormat(String targetFormat) throws UnsupportedFormatException
targetFormat - target image format (jpg, png, ...)UnsupportedFormatException - if format/extension can not be parsedImageBitDepth parseIiifQuality(String targetQuality) throws InvalidParametersException
targetQuality - target image qualityInvalidParametersException - if quality can not be parsedRegionParameters parseIiifRegion(String region) throws InvalidParametersException
Relative definition "pct:x,y,w,h": The region to be returned is specified as a sequence of percentages of the full image’s dimensions, as reported in the Image Information document. Thus, x represents the number of pixels from the 0 position on the horizontal axis, calculated as a percentage of the reported width. w represents the width of the region, also calculated as a percentage of the reported width. The same applies to y and h respectively. These may be floating point numbers.
Absolute definition "x,y,w,h": The region of the full image to be returned is defined in terms of absolute pixel values. The value of x represents the number of pixels from the 0 position on the horizontal axis. The value of y represents the number of pixels from the 0 position on the vertical axis. Thus the x,y position 0,0 is the upper left-most pixel of the image. w represents the width of the region and h represents the height of the region in pixels.
region - region definitionInvalidParametersException - if region definition can not be parsedRotationParameters parseIiifRotation(String rotation) throws InvalidParametersException
rotation - n: The degrees of clockwise rotation from 0 up to 360., !n: The image should be mirrored and then
rotated.InvalidParametersException - if argument can not interpretedResizeParameters parseIiifSize(String size) throws InvalidParametersException
size - target sizeInvalidParametersException - if size can not be parsedCopyright © 2016. All rights reserved.