setasign\SetaPDF2\Core\Image
WebP Class representing an WebP image
File: /SetaPDF v2/Core/Image/WebP.php
Internally the WebP format is handled through GD and converted to JPEG or PNG for further processing.
Class hierarchy
Summary
Constants
FORMAT_SIMPLE_EXTENDED
FORMAT_SIMPLE_LOSSLESS
FORMAT_SIMPLE_LOSSY
TYPE_GIF
TYPE_JPEG
TYPE_JPEG2000
Image type
TYPE_PNG
TYPE_TIFF
TYPE_UNKNOWN
Image type
TYPE_WEBP
Properties
Static Methods
get()
Get an image by a reader.
Parameters
- $reader: \setasign\SetaPDF2\Core\Reader\ReaderInterface
The reader instance
Exceptions
Throws \setasign\SetaPDF2\NotImplementedException If the image type is not supported (supported types: JPEG, PNG, JPEG2000).
Methods
__construct()
getColorSpace()
WARNING: This method is marked as deprecated!
Should be moved to the individual image type implementation
Get the image type specific colorspace.
toXObject()
public WebP::toXObject (
\setasign\SetaPDF2\Core\Document $document
): \setasign\SetaPDF2\Core\XObject\ImageConverts the WebP image to an external object.
This is done by using GD for the conversion from WebP to either JPG or PNG.
Parameters
- $document: \setasign\SetaPDF2\Core\Document
Exceptions
Throws \setasign\SetaPDF2\Core\Filter\Exception
Throws Exception
Throws \setasign\SetaPDF2\NotImplementedException
