The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IIIF::Magick - transform image with IIIF Image API Request using Image Magick

SYNOPSIS

    use IIIF::Magick qw(info convert);

    my $info = info($file, profile => "level0", id => "...") ;
    
    convert( $request, $file, "target.png" );

DESCRIPTION

This module maps IIIF ImageAPI request parameters to ImageMagick command line arguments. See i3f (command line) and IIIF::ImageAPI (web service) for applications that make use of it.

FUNCTIONS

available

Returns whether ImageMagick is available.

info( $file [, id => $id ] [, profile => $profile ] )

Returns image information object with fields @context, type, protocol, width, and height. Fields id and profile must be added for full IIIF compliance.

convert( $request, $file, $output [, @args ] )

Convert an image file as specified with a IIIF::Request into an output file. Returns true on success. Additional arguments are prepended to the call of ImageMagick's convert.

args( $request, $file )

Get the list of command line arguments to convert to transform an image file as specified via a IIIF::Request.