1JPEG(3)               User Contributed Perl Documentation              JPEG(3)
2
3
4

NAME

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

SYNOPSIS

9         use Imager;
10
11         my $img = Imager->new;
12         $img->read(file=>"foo.jpg")
13           or die $img->errstr;
14
15         $img->write(file => "foo.jpg")
16           or die $img->errstr;
17
18         my $version = Imager::File::JPEG->libjpeg_version();
19         if (Imager::File::JPEG->is_turbojpeg) { ... }
20         if (Imager::File::JPEG->is_mozjpeg) { ... }
21
22         if (Imager::File::JPEG->has_arith_coding) { ... }
23

DESCRIPTION

25       Imager's JPEG support is documented in Imager::Files.
26
27       Besides providing JPEG support, Imager::File::JPEG has the following
28       methods:
29
30       libjpeg_version()
31             Imager::File::JPEG->libjpeg_version();
32
33           Returns version information about the variety of "libjpeg"
34           Imager::File::JPEG was compiled with.  This is determined at build
35           time.  This includes:
36
37           •   The library type, one of "libjpeg", "libjpeg-turbo" or
38               "mozjpeg".
39
40           •   "version" followed by the library version number.
41
42           •   "api" followed by the "libjpeg" API version.
43
44           For "libjpeg" the API and library versions are always equal.
45
46       is_turbojpeg()
47             Imager::File::JPEG->is_turbojpeg();
48
49           Returns true if Imager::File::JPEG was built with "libjpeg-turbo".
50           Note that "mozjpeg" is built on top of "libjpeg-turbo" so this will
51           return true for "mozjpeg".
52
53       is_mozjpeg()
54             Imager::File::JPEG->is_mozjpeg();
55
56           Returns true if Imager::File::JPEG was built with "mozjpeg".  Note
57           that "mozjpeg" doesn't define its own version numbering, so
58           "mozjpeg" is detected by defines that only "mozjpeg" currently
59           defines.
60
61       has_arith_coding()
62           Returns true if the "libjpeg" variant "Imager::File::JPEG" was
63           built with has both encoding and decoding support for arithmetic
64           coding.
65
66       has_encode_arith_coding()
67           Returns true if the "libjpeg" variant "Imager::File::JPEG" was
68           built with has encoding support for arithmetic coding.
69
70       has_decode_arith_coding()
71           Returns true if the "libjpeg" variant "Imager::File::JPEG" was
72           built with has decoding support for arithmetic coding.
73

AUTHOR

75       Tony Cook <tonyc@cpan.org>
76

SEE ALSO

78       Imager, Imager::Files.
79
80
81
82perl v5.36.0                      2023-01-20                           JPEG(3)
Impressum