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