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.
$_previousFrame
private Frame Frame::$_previousFrame
The previous frame that shall be rendered underneath the current one.
$_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 (
Reader $reader,
Block\ImageDescriptor $image,
array $transparentIndices,
?Frame $previousFrame = null,
int $delayTime = 0
)Block\ImageDescriptor $image,
array $transparentIndices,
?Frame $previousFrame = null,
int $delayTime = 0
The constructor.
Parameters
- $reader : Reader
- $image : Block\ImageDescriptor
- $transparentIndices : array
- $previousFrame : ?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[]
_createMaskStream()
private Frame::_createMaskStream (
string $transparencyMask
): \setasign\SetaPDF2\Core\Type\PdfStreamCreates a SMask for the current image.
Parameters
- $transparencyMask : 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()
public Frame::toXObject (
\setasign\SetaPDF2\Core\Document $document
): \setasign\SetaPDF2\Core\XObject\ImageCreates a XObject using the stored frame data.
Parameters
- $document : \setasign\SetaPDF2\Core\Document