GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
JPEG(3) User Contributed Perl Documentation JPEG(3)

Imager::File::JPEG - read and write JPEG files

  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) { ... }

Imager's JPEG support is documented in Imager::Files.

Besides providing JPEG support, Imager::File::JPEG has the following methods:

  Imager::File::JPEG->libjpeg_version();
    

Returns version information about the variety of "libjpeg" Imager::File::JPEG was compiled with. This is determined at build time. This includes:

  • The library type, one of "libjpeg", "libjpeg-turbo" or "mozjpeg".
  • "version" followed by the library version number.
  • "api" followed by the "libjpeg" API version.

For "libjpeg" the API and library versions are always equal.

  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".

  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.

Returns true if the "libjpeg" variant "Imager::File::JPEG" was built with has both encoding and decoding support for arithmetic coding.
Returns true if the "libjpeg" variant "Imager::File::JPEG" was built with has encoding support for arithmetic coding.
Returns true if the "libjpeg" variant "Imager::File::JPEG" was built with has decoding support for arithmetic coding.

Tony Cook <tonyc@cpan.org>

Imager, Imager::Files.

2025-06-04 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.