.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "JPEG 3pm" .TH JPEG 3pm 2024-04-13 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Imager::File::JPEG \- read and write JPEG files .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& 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) { ... } .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Imager's JPEG support is documented in Imager::Files. .PP Besides providing JPEG support, Imager::File::JPEG has the following methods: .IP \fBlibjpeg_version()\fR 4 .IX Item "libjpeg_version()" .Vb 1 \& Imager::File::JPEG\->libjpeg_version(); .Ve .Sp Returns version information about the variety of \f(CW\*(C`libjpeg\*(C'\fR Imager::File::JPEG was compiled with. This is determined at build time. This includes: .RS 4 .IP \(bu 4 The library type, one of \f(CW\*(C`libjpeg\*(C'\fR, \f(CW\*(C`libjpeg\-turbo\*(C'\fR or \f(CW\*(C`mozjpeg\*(C'\fR. .IP \(bu 4 \&\f(CW\*(C`version\*(C'\fR followed by the library version number. .IP \(bu 4 \&\f(CW\*(C`api\*(C'\fR followed by the \f(CW\*(C`libjpeg\*(C'\fR API version. .RE .RS 4 .Sp For \f(CW\*(C`libjpeg\*(C'\fR the API and library versions are always equal. .RE .IP \fBis_turbojpeg()\fR 4 .IX Item "is_turbojpeg()" .Vb 1 \& Imager::File::JPEG\->is_turbojpeg(); .Ve .Sp Returns true if Imager::File::JPEG was built with \f(CW\*(C`libjpeg\-turbo\*(C'\fR. Note that \f(CW\*(C`mozjpeg\*(C'\fR is built on top of \f(CW\*(C`libjpeg\-turbo\*(C'\fR so this will return true for \f(CW\*(C`mozjpeg\*(C'\fR. .IP \fBis_mozjpeg()\fR 4 .IX Item "is_mozjpeg()" .Vb 1 \& Imager::File::JPEG\->is_mozjpeg(); .Ve .Sp Returns true if Imager::File::JPEG was built with \f(CW\*(C`mozjpeg\*(C'\fR. Note that \f(CW\*(C`mozjpeg\*(C'\fR doesn't define its own version numbering, so \&\f(CW\*(C`mozjpeg\*(C'\fR is detected by defines that only \f(CW\*(C`mozjpeg\*(C'\fR currently defines. .IP \fBhas_arith_coding()\fR 4 .IX Item "has_arith_coding()" Returns true if the \f(CW\*(C`libjpeg\*(C'\fR variant \f(CW\*(C`Imager::File::JPEG\*(C'\fR was built with has both encoding and decoding support for arithmetic coding. .IP \fBhas_encode_arith_coding()\fR 4 .IX Item "has_encode_arith_coding()" Returns true if the \f(CW\*(C`libjpeg\*(C'\fR variant \f(CW\*(C`Imager::File::JPEG\*(C'\fR was built with has encoding support for arithmetic coding. .IP \fBhas_decode_arith_coding()\fR 4 .IX Item "has_decode_arith_coding()" Returns true if the \f(CW\*(C`libjpeg\*(C'\fR variant \f(CW\*(C`Imager::File::JPEG\*(C'\fR was built with has decoding support for arithmetic coding. .SH AUTHOR .IX Header "AUTHOR" Tony Cook .SH "SEE ALSO" .IX Header "SEE ALSO" Imager, Imager::Files.