setasign\SetaPDF2\Core\Image\Gif
Frame Class representing a GIF frame.
File: /SetaPDF v2/Core/Image/Gif/Frame.php
Old class name (alias):
\SetaPDF_Core_Image_Gif_Frame
Class hierarchy
Summary
Static Properties
Properties
$_delayTime
private int Frame::$_delayTime
The time to wait before drawing the next frame.
$_reader
private \SetaPDF_Core_Image_Gif_Reader Frame::$_reader
The GIF reader.
$_transparencyMask
private ?string Frame::$_transparencyMask
The cached transparent pixels, if there are no pixels left, the value will change to null.
$_transparencyPixelCount
private ?int Frame::$_transparencyPixelCount
The cached number of transparent pixels, if there are no pixels left, the value will change to null.
$_transparentIndices
private array Frame::$_transparentIndices
The transparent indices.
Methods
__construct()
public Frame::__construct (
\SetaPDF_Core_Image_Gif_Reader $reader,
\SetaPDF_Core_Image_Gif_Block_ImageDescriptor $image,
array $transparentIndices,
?\SetaPDF_Core_Image_Gif_Frame $previousFrame = null,
int $delayTime = 0
)\SetaPDF_Core_Image_Gif_Block_ImageDescriptor $image,
array $transparentIndices,
?\SetaPDF_Core_Image_Gif_Frame $previousFrame = null,
int $delayTime = 0
The constructor.
Parameters
- $reader : \SetaPDF_Core_Image_Gif_Reader
- $image : \SetaPDF_Core_Image_Gif_Block_ImageDescriptor
- $transparentIndices : array
- $previousFrame : ?\SetaPDF_Core_Image_Gif_Frame
- $delayTime : int
_applyPixels()
private Frame::_applyPixels (
string &$stream,
?string &$transparencyMask,
?int &$transparencyPixelCount,
int[] $pixels,
string[] $colorTable
): void?string &$transparencyMask,
?int &$transparencyPixelCount,
int[] $pixels,
string[] $colorTable
Applies all the pixel changes onto the stream.
Parameters
- $stream : string
- $transparencyMask : ?string
- $transparencyPixelCount : ?int
- $pixels : int[]
- $colorTable : string[]
_ensureStream()
private Frame::_ensureStream (
?string &$stream,
?string &$transparencyMask,
?int &$transparencyPixelCount = null
): void?string &$transparencyMask,
?int &$transparencyPixelCount = null
Ensures that the stream is the read stream.
Parameters
- $stream : ?string
- $transparencyMask : ?string
- $transparencyPixelCount : ?int
Exceptions
_readStream()
private Frame::_readStream (
?string &$stream,
?string &$transparencyMask,
?int &$transparencyPixelCount
): void?string &$transparencyMask,
?int &$transparencyPixelCount
Reads the current stream and renders it onto the image stream.
Parameters
- $stream : ?string
- $transparencyMask : ?string
- $transparencyPixelCount : ?int
Exceptions
toXObject()
Creates a XObject using the stored frame data.
Parameters
- $document : \SetaPDF_Core_Document