setasign\SetaPDF2\Core\Image
Png Class representing an PNG image
File: /SetaPDF v2/Core/Image/Png.php
Old class name (alias):
\SetaPDF_Core_Image_Png
Class hierarchy
Summary
Constants
TYPE_GIF
TYPE_JPEG
TYPE_JPEG2000
Image type
TYPE_PNG
TYPE_TIFF
TYPE_UNKNOWN
Image type
Properties
$_binaryReader
protected \SetaPDF_Core_Reader_Binary Image::$_binaryReader
Binary Reader
$_imageData
protected resource Png::$_imageData
Image stream data
$_isInterlaced
protected bool Png::$_isInterlaced
Defines whether the image is interlaced or not
Static Methods
get()
Get an image by a reader.
Parameters
- $reader : \SetaPDF_Core_Reader_ReaderInterface
The reader instance
Exceptions
Throws \setasign\SetaPDF2\NotImplementedException If the image type is not supported (supported types: JPEG, PNG, JPEG2000).
getType()
Methods
__construct()
_extractAlphaChannel()
Extracts the alpha channel from the image data.
Parameters
- $decodeParameters : array
Exceptions
toXObject()
Converts the PNG image to an external object.
Parameters
- $document : \SetaPDF_Core_Document
Exceptions
Throws \setasign\SetaPDF2\Core\Filter\Exception
Throws Exception
Throws \setasign\SetaPDF2\NotImplementedException