1PDF::Builder::Resource:U:sXeOrbjCeoPcnDttF:r::i:IbBmuuatigeledd:e:PrPe:Nr:GlR_eIDsPooLcu(ur3mc)een:t:aXtOibojnect::Image::PNG_IPL(3)
2
3
4

NAME

6       PDF::Builder::Resource::XObject::Image::PNG_IPL - support routines for
7       PNG image library (using Image::PNG::Libpng).  Inherits from
8       PDF::Builder::Resource::XObject::Image
9

METHODS

11       $res = PDF::Builder::Resource::XObject::Image::PNG_IPL->new($pdf,
12       $file, %opts)
13           Returns a PNG-image object. $pdf is the PDF object being added to,
14           $file is the input PNG file, and the optional $name of the new
15           parent image object defaults to PxAAA.
16
17           If the Image::PNG::Libpng package is installed, and its use is not
18           suppressed via the "nouseIPL" flag (see Builder documentation for
19           "image_png"), the PNG_IPL library will be used. Otherwise, the PNG
20           library will be used instead.
21
22           opts:
23
24           'notrans' => 1
25               No transparency -- ignore tRNS chunk if provided, ignore Alpha
26               channel if provided.
27
28           'force8bps' => 1
29               If the PNG source is 16bps, tell the libpng library to strip
30               down all channels to 8bps, permitting use on PDF 1.4 output.
31
32           'name' => 'string'
33               This is the name you can give for the PNG image object. The
34               default is Pxnnnn.
35
36   Supported PNG types
37          (0) Gray scale of depth 1, 2, 4, 8, or 16 bits per pixel (2, 4, 16, 256,
38              or 65536 gray levels). Full transparency (of one 16-bit gray value)
39              via the tRNS chunk is allowed, unless the notrans option specifies
40              that it be ignored.
41
42          (2) RGB truecolor with 8 or 16 bits per sample (3 samples: 16.7 million
43              or 281.5 trillion colors). Full transparency (of one 3x16-bit RGB
44              color value) via the tRNS chunk is allowed, unless the notrans
45              option specifies that it be ignored.
46
47          (3) Palette color with 1, 2, 4, or 8 bits per pixel (2, 4, 16, or 256
48              color table/palette entries). 16 bpp is not currently supported by
49              PNG or PDF. Partial transparency (8-bit Alpha) for each palette
50              entry via the tRNS chunk is allowed, unless the notrans option
51              specifies that it be ignored (all entries fully opaque).
52
53          (4) Gray scale of depth 8 or 16 bits per pixel plus equal-sized Alpha
54              channel (256 or 65536 gray levels and 256 or 65536 levels of
55              transparency). The Alpha channel is ignored if the notrans
56              option is given. The tRNS chunk is not permitted.
57
58          (5) B<RESERVED> for grayscale via palette + Alpha channel
59
60          (6) RGB truecolor with 8 or 16 bits per sample, with equal-sized
61              Alpha channel (256 or 65536 levels of transparency). The Alpha
62              channel is ignored if the notrans option is given. The tRNS
63              chunk is not permitted.
64
65          (7) B<RESERVED> for truecolor via palette + Alpha channel
66
67       In all cases, 16 bits per sample forces PDF 1.5 (or higher) output,
68       unless you give the "force8bps" option, to "strip" 16 bit samples to 8
69       bits, and permit PDF 1.4-compatible output.  The libpng.a library is
70       assuming standard "network" bit and byte ordering (Big Endian),
71       although flags might be added to change this.
72
73       The transparency chunk (tRNS) will specify one gray level entry or one
74       RGB entry to be treated as transparent (Alpha = 0). For palette color,
75       up to 256 palette entry 8-bit Alpha values are specified (256 levels of
76       transparency, from 0 = transparent to 255 = opaque).
77
78       Only a limited number of chunks are handled: IHDR, IDAT (internally),
79       PLTE, tRNS, and IEND (internally). All other chunks are ignored at this
80       time. Filters and compression applied to data is handled internally by
81       libpng.a -- there may be unsupported methods.
82
83       $mode = $png->usesLib()
84           Returns 1 if Image::PNG::Libpng installed and used, 0 if not
85           installed, or -1 if installed but not used (nouseIPL option given
86           to "image_png").
87
88           Caution: this method can only be used after the image object has
89           been created. It can't tell you whether Image::PNG::Libpng is
90           available in advance of actually using it, in case you want to use
91           some functionality available only in PNG_IPL. See the PDF::Builder
92           LA_IPL() call if you need to know in advance.
93
94
95
96perl v5.36.0                PDF::B2u0i2l3d-e0r1:-:2R3esource::XObject::Image::PNG_IPL(3)
Impressum