@Controller(value="IIIFImageApiController-v2") @RequestMapping(value="/image/v2/") public class IIIFImageApiController extends Object
| Constructor and Description |
|---|
IIIFImageApiController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<byte[]> |
getImageRepresentation(String identifier,
String region,
String size,
String rotation,
String quality,
String format,
javax.servlet.http.HttpServletRequest request)
see IIIF 2.0
The sequence of parameters in the URI is intended as a mnemonic for the order in which image manipulations are made against the full image content. |
org.springframework.http.ResponseEntity<String> |
getInfo(String identifier,
javax.servlet.http.HttpServletRequest request)
Specification see: http://iiif.io/api/image/2.0/#image-information
|
String |
getInfoRedirect(String identifier) |
public static final String VERSION
@CrossOrigin(allowedHeaders="*",
origins="*")
@RequestMapping(value="{identifier}/{region}/{size}/{rotation}/{quality}.{format}")
public org.springframework.http.ResponseEntity<byte[]> getImageRepresentation(@PathVariable
String identifier,
@PathVariable
String region,
@PathVariable
String size,
@PathVariable
String rotation,
@PathVariable
String quality,
@PathVariable
String format,
javax.servlet.http.HttpServletRequest request)
throws ResolvingException,
UnsupportedFormatException,
UnsupportedOperationException,
IOException,
URISyntaxException,
InvalidParametersException,
TransformationException
identifier - unique identifier of imageregion - The region parameter defines the rectangular portion of the full image to be returned. Region can be
specified by pixel coordinates, percentage or by the value “full”, which specifies that the entire image should be
returned.size - The size parameter determines the dimensions to which the extracted region is to be scaled.rotation - The rotation parameter specifies mirroring and rotation. A leading exclamation mark (“!”) indicates
that the image should be mirrored by reflection on the vertical axis before any rotation is applied. The numerical
value represents the number of degrees of clockwise rotation, and may be any floating point number from 0 to 360.quality - The quality parameter determines whether the image is delivered in color, grayscale or black and
white.format - The format of the returned image is expressed as an extension at the end of the URI.request - http requestResolvingException - if identifier can not be resolved to an imageUnsupportedFormatException - if target format is not supportedUnsupportedOperationException - if operation is not supportedIOException - if image can not be readURISyntaxException - if uri for image is erroneousInvalidParametersException - if parameters
can not be parsedTransformationException - if image can not
be transformed@CrossOrigin(allowedHeaders="*",
origins="*")
@RequestMapping(value="{identifier}/info.json",
method={GET,HEAD})
public org.springframework.http.ResponseEntity<String> getInfo(@PathVariable
String identifier,
javax.servlet.http.HttpServletRequest request)
throws ResolvingException,
UnsupportedFormatException,
UnsupportedOperationException,
UnsupportedEncodingException
Example response:
{
"@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json",
"@id": "http://iiif.example.com/prefix/1E34750D-38DB-4825-A38A-B60A345E591C",
"width": 6000, "height": 4000
}
identifier - - The identifier to obtain information forrequest - servlet requestResolvingException - if identifier can not be resolved to an imageUnsupportedFormatException - if target format is not supportedUnsupportedOperationExceptionUnsupportedEncodingExceptionCopyright © 2017. All rights reserved.