JPEG(3pm)
Okay bestie, welcome to JPEG(3pm) β the Imager::File::JPEG manual page from the User Contributed Perl Documentation crew, and it's literally about reading and writing JPEG files. β¨
πΈ NAME πΈ
Imager::File::JPEG β read and write JPEG files. No cap. π
β¨ SYNOPSIS β¨
Here's the whole vibe in code, bestie:
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. That's the main-character doc, go read it. π«Ά
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 libjpeg that Imager::File::JPEG was compiled with. This is determined at build time, bestie. It includes:
- The library type, one of
libjpeg,libjpeg-turboormozjpeg. π versionfollowed by the library version number. π₯apifollowed by thelibjpegAPI version. β¨
For libjpeg the API and library versions are always equal. Periodt.
π¦ is_turbojpeg() π¦
Imager::File::JPEG->is_turbojpeg();
Returns true if Imager::File::JPEG was built with libjpeg-turbo. Note that mozjpeg is built on top of libjpeg-turbo, so this will return true for mozjpeg. π
π is_mozjpeg() π
Imager::File::JPEG->is_mozjpeg();
Returns true if Imager::File::JPEG was built with mozjpeg. Note that mozjpeg doesn't define its own version numbering, so mozjpeg is detected by defines that only mozjpeg currently defines. Iykyk. π
π has_arith_coding() π
Returns true if the libjpeg variant that Imager::File::JPEG was built with has both encoding and decoding support for arithmetic coding. Both, bestie β encode AND decode. π
β has_encode_arith_coding() β
Returns true if the libjpeg variant that Imager::File::JPEG was built with has encoding support for arithmetic coding. β¨
πΈ has_decode_arith_coding() πΈ
Returns true if the libjpeg variant that Imager::File::JPEG was built with has decoding support for arithmetic coding. β¨
π AUTHOR π
Tony Cook β tonyc@cpan.org β author icon, no cap. π«Ά
π SEE ALSO π
ImagerImager::Files
Go read these next, bestie. π
Cute sign-off: this page is from perl v5.42.3, dated 2026-08-19, and yeah, it's JPEG(3pm). That's the footer tea. π
β¨
π¦ where this page comes from
- ubuntu stonking: libimager-perl 1.035+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms