NAME
PDF::Builder::Resource::XObject::Image::PNG - support routines for PNG image library. Inherits from PDF::Builder::Resource::XObject::Image
- $res = PDF::Builder::Resource::XObject::Image::PNG->new($pdf, $file, $name, %opts)
- $res = PDF::Builder::Resource::XObject::Image::PNG->new($pdf, $file, $name)
- $res = PDF::Builder::Resource::XObject::Image::PNG->new($pdf, $file)
Returns a PNG-image object. $pdf
is the PDF object being added to, $file
is the input PNG file, and the optional $name
of the new parent image object defaults to PxAAA.
opts: -notrans
No transparency -- ignore tRNS chunk if provided, ignore Alpha channel
if provided.
Supported PNG types
(0) Gray scale of depth 1, 2, 4, or 8 bits per pixel (2, 4, 16, or 256 gray
levels). 16 bps is not currently supported. Transparency via the tRNS
chunk is allowed, unless the -notrans option is given.
(2) RGB 24-bit truecolor with 8 bits per sample (16.7 million colors).
16 bps is not currently supported. Transparency via the tRNS chunk is
allowed, unless the -notrans option is given.
(3) Palette color with 1, 2, 4, or 8 bits per pixel depth (2, 4, 16, or
256 color table entries). 16 bpp is not currently supported. Transparency
via the tRNS chunk is allowed, unless the -notrans option is given.
(4) Gray scale of depth 8 bits per pixel plus 8 bit Alpha channel (256
gray levels and 256 levels of transparency). 16 bpp is not currently
supported. The Alpha channel is ignored if the -notrans option is
given. The tRNS chunk is not permitted.
(6) RGB 24-bit truecolor with 8 bits per sample (16.7 million colors) plus
8 bit Alpha channel (256 levels of transparency). 16 bps is not
currently supported. The Alpha channel is ignored if the -notrans
option is given. The tRNS chunk is not permitted.