NAME
Imager::File::JPEG - read and write JPEG files
SYNOPSIS
use Imager;
my $img = Imager->new;
$img->read(file=>"foo.jpg")
or die $img->errstr;
$img->write(file => "foo.jpg")
or die $img->errstr;
my $version = Imager::File::JPEG->libjpeg_version();
if (Imager::File::JPEG->is_turbojpeg) { ... }
if (Imager::File::JPEG->is_mozjpeg) { ... }
if (Imager::File::JPEG->has_arith_coding) { ... }
DESCRIPTION
Imager's JPEG support is documented in Imager::Files.
Besides providing JPEG support, Imager::File::JPEG has the following methods:
- libjpeg_version()
-
Imager::File::JPEG->libjpeg_version();Returns version information about the variety of
libjpegImager::File::JPEG was compiled with. This is determined at build time. This includes:The library type, one of
libjpeg,libjpeg-turboormozjpeg.versionfollowed by the library version number.apifollowed by thelibjpegAPI version.
For
libjpegthe API and library versions are always equal. - is_turbojpeg()
-
Imager::File::JPEG->is_turbojpeg();Returns true if Imager::File::JPEG was built with
libjpeg-turbo. Note thatmozjpegis built on top oflibjpeg-turboso this will return true formozjpeg. - is_mozjpeg()
-
Imager::File::JPEG->is_mozjpeg();Returns true if Imager::File::JPEG was built with
mozjpeg. Note thatmozjpegdoesn't define its own version numbering, somozjpegis detected by defines that onlymozjpegcurrently defines. - has_arith_coding()
-
Returns true if the
libjpegvariantImager::File::JPEGwas built with has both encoding and decoding support for arithmetic coding. - has_encode_arith_coding()
-
Returns true if the
libjpegvariantImager::File::JPEGwas built with has encoding support for arithmetic coding. - has_decode_arith_coding()
-
Returns true if the
libjpegvariantImager::File::JPEGwas built with has decoding support for arithmetic coding.
AUTHOR
Tony Cook <tonyc@cpan.org>
SEE ALSO
Imager, Imager::Files.