ONO::Lib::Image::Magick

Functions

action();

Image actions: rotate, or flip.

Available switches:

-t re-generate thumbs

ONO::Lib::Image::Magick->action( $file, $target, $option, $switches );
returns: 1

convert();

Convert an image, by generating a JPG image in most cases.

Available switches:

-F only convert the First page of a PDF file
-d debug on devstation
-D delete source file after conversion (only if successful)
-h half quality (PDF only, can be combined with -H)
-H quarter quality (PDF only, can be combined with -h)
-Q QR code mode - important, as images need to be converted to RGB
-R force RGB conversion (also see -V)
-S Size force to 920 for HEIC images
-V use the Video library (ffmpeg) instead of Image::Magick for RGB conversion

Important note regarding the handling of PDF documents: In order to read/write PDF files, the IM's policy file may have to bechanged: /etc/ImageMagick-VER/policy.xml

ONO::Lib::Image::Magick->convert( $file, $target, $switches, $option );

detect_convert();

Detect if the convert or magick command is installed. This will prefer the magick command, if available.

ONO::Lib::Image::Magick->detect_convert( );

getinfo();

Return image info, using the Image Magick 'identify' tool.

ONO::Lib::Image::Magick->getinfo( $file, $switches );
returns: $INFO

resize();

Resize an image.

ONO::Lib::Image::Magick->resize( $file, $target, $width, $height, $switches );
returns: ($process,$width,$height,$debugger)

rotate();

Rotate image, using the ImageMagick convert/magick command directly. This can be used as an alternative to the action tool.

ONO::Lib::Image::Magick->rotate( $file, $target, $rotate, $switches );

Sub-Modules

none

Dependencies

Optional CPAN Modules

The following modules may be optional, but they are probably required for all features to work properly.

Code