1PDF::Builder::Resource:U:sXeOrbjCeocntt:r:iPIbDmuFat:ge:edB:u:PiPelNrdGle(r3D:)o:cRuemseonutractei:o:nXObject::Image::PNG(3)
2
3
4

NAME

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

METHODS

11       $res = PDF::Builder::Resource::XObject::Image::PNG->new($pdf, $file,
12       $name, %opts)
13       $res = PDF::Builder::Resource::XObject::Image::PNG->new($pdf, $file,
14       $name)
15       $res = PDF::Builder::Resource::XObject::Image::PNG->new($pdf, $file)
16
17       Returns a PNG-image object. $pdf is the PDF object being added to,
18       $file is the input PNG file, and the optional $name of the new parent
19       image object defaults to PxAAA.
20
21       If the Image::PNG::Libpng package is installed, the PNG_IPL library
22       will be used instead of the PNG library. In such a case, use of the PNG
23       library may be forced via the "-nouseIPL" flag (see Builder
24       documentation for "image_png()").
25
26       opts: -notrans
27
28          No transparency -- ignore tRNS chunk if provided, ignore Alpha channel
29          if provided.
30
31   Supported PNG types
32          (0) Gray scale of depth 1, 2, 4, or 8 bits per pixel (2, 4, 16, or 256
33              gray levels). 16 bpp is not currently supported (a PNG with 16 bpp
34              is a fatal error). Full transparency (of one 8-bit gray value) via
35              the tRNS chunk is allowed, unless the -notrans option specifies
36              that it be ignored.
37
38          (2) RGB 24-bit truecolor with 8 bits per sample (16.7 million colors).
39              16 bps is not currently supported (a PNG with 16 bps is a fatal
40              error). Full transparency (of one 3x8-bit RGB color value) via the
41              tRNS chunk is allowed, unless the -notrans option specifies that it
42              be ignored.
43
44          (3) Palette color with 1, 2, 4, or 8 bits per pixel (2, 4, 16, or 256
45              color table/palette entries). 16 bpp is not currently supported by
46              PNG or PDF. Partial transparency (8-bit Alpha) for each palette
47              entry via the tRNS chunk is allowed, unless the -notrans option
48              specifies that it be ignored (all entries fully opaque).
49
50          (4) Gray scale of depth 8 bits per pixel plus 8-bit Alpha channel (256
51              gray levels and 256 levels of transparency). 16 bpp is not
52              currently supported (a PNG with 16 bpp is a fatal error). The Alpha
53              channel is ignored if the -notrans option is given. The tRNS chunk
54              is not permitted.
55
56          (6) RGB 24-bit truecolor with 8 bits per sample (16.7 million colors)
57              plus 8-bit Alpha channel (256 levels of transparency). 16 bps is not
58              currently supported (a PNG with 16 bps is a fatal error). The Alpha
59              channel is ignored if the -notrans option is given. The tRNS chunk
60              is not permitted.
61
62       In all cases, 16 bits per sample are not implemented. A fatal error
63       will be returned if a PNG image with 16-bps data is supplied. The code
64       is assuming standard "network" bit ordering (Big Endian). Interlaced
65       (progressive) display images are not supported. Use the PNG_IPL version
66       if you need to support 16 bps or interlaced images.
67
68       The transparency chunk (tRNS) will specify one gray level entry or one
69       RGB entry to be treated as transparent (Alpha = 0). For palette color,
70       up to 256 palette entry 8-bit Alpha values are specified (256 levels of
71       transparency, from 0 = transparent to 255 = opaque).
72
73       Only a limited number of chunks are handled: IHDR, IDAT (internally),
74       PLTE, tRNS, and IEND (internally). All other chunks are ignored at this
75       time. Certain filters and compressions applied to data will be handled,
76       but there may be unsupported methods.
77
78       $mode = $png->usesLib()
79           Returns 1 if Image::PNG::Libpng installed and used, 0 if not
80           installed, or -1 if installed but not used (-nouseIPL option given
81           to "image_png").
82
83           Caution: this method can only be used after the image object has
84           been created. It can't tell you whether Image::PNG::Libpng is
85           available in advance of actually using it, in case you want to use
86           some functionality available only in PNG_IPL. See the PDF::Builder
87           LA_IPL() call if you need to know in advance.
88
89
90
91perl v5.34.0                    PD2F0:2:2B-u0i1l-d2e1r::Resource::XObject::Image::PNG(3)
Impressum