Imager::Files is a Perl module which allows working with image files.
SYNOPSIS
my $img = ...;
$img->write(file=>$filename, type=>$type)
or die "Cannot write: ",$img->errstr;
$img = Imager->new;
$img->read(file=>$filename, type=>$type)
or die "Cannot read: ", $img->errstr;
Imager->write_multi({ file=> $filename, ... }, @images)
or die "Cannot write: ", Imager->errstr;
my @imgs = Imager->read_multi(file=>$filename)
or die "Cannot read: ", Imager->errstr;
Imager->set_file_limits(width=>$max_width, height=>$max_height)
my @read_types = Imager->read_types;
my @write_types = Imager->write_types;
You can read and write a variety of images formats, assuming you have the appropriate libraries, and images can be read or written to/from files, file handles, file descriptors, scalars, or through callbacks.
To see which image formats Imager is compiled to support the following code snippet is sufficient:
use Imager;
print join " ", keys %Imager::formats;
This will include some other information identifying libraries rather than file formats. For new code you might find the "read_types" or "write_types" methods useful.
Product's homepage
Requirements:
· Perl