IIIF::ImageAPI - IIIF Image API implementation as Plack application
use Plack::Builder; use IIIF::ImageAPI; builder { enable 'CrossOrigin', origins => '*'; IIIF::ImageAPI->new( images => 'path/to/images', base => 'https://example.org/iiif/', formats => [qw(jpg png gif tif pdf webp jp2)], ); }
Either an image directory (set to the current directory by default) or a code reference of a function that maps image identifiers to image files.
Cache directory. Set to a temporary per-process directory by default. Please use different cache directories for different settings of maxWidth and maxHeight.
maxWidth
maxHeight
Base URI which the service is hosted at, including trailing slash. Likely required if the service is put behind a web proxy.
Redirect requests to the canonical URI syntax and include (disabled by default). A canonical Link header is set anyway.
List of supported image formats. Set to ['jpg', 'png', 'gif'] by default. On configuration with other formats make sure ImageMagick supports them (see "REQUIREMENTS" in IIIF::Magick).
['jpg', 'png', 'gif']
Optional list of preferred image formats. MUST be a subset of or equal to formats. The first preferred format, if given, will be used as default if a request does no specify a file format.
formats
Optional maximum width in pixels to be supported.
Optional maximum height in pixels to be supported.
Optional maximum pixel area (width x height) to be supported.
Optional string that identifies a license or rights statement for all images, to be included in image information responses.
Optional array with Services to be included in image information responses.
Additional command line arguments always used when calling ImageMagick. For instance [qw(-limit memory 1GB -limit disk 1GB)] to limit resources.
[qw(-limit memory 1GB -limit disk 1GB)]
To install IIIF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IIIF
CPAN shell
perl -MCPAN -e shell install IIIF
For more information on module installation, please visit the detailed CPAN module installation guide.