SetaPDF_Core_Image_Gif_Frame Class representing a GIF frame.
File: /SetaPDF v2/Core/Image/Gif/Frame.php
Class hierarchy
Summary
Static Properties
Properties
$_delayTime
private int SetaPDF_Core_Image_Gif_Frame::$_delayTime
The time to wait before drawing the next frame.
$_imageDescriptor
private SetaPDF_Core_Image_Gif_Block_ImageDescriptor[] SetaPDF_Core_Image_Gif_Frame::$_imageDescriptor
The associated image descriptors.
$_stream
private string|null SetaPDF_Core_Image_Gif_Frame::$_stream
The cached image stream.
$_transparencyMask
private string|null SetaPDF_Core_Image_Gif_Frame::$_transparencyMask
The cached transparent pixels, if there are no pixels left, the value will change to null.
$_transparencyPixelCount
private int|null SetaPDF_Core_Image_Gif_Frame::$_transparencyPixelCount
The cached number of transparent pixels, if there are no pixels left, the value will change to null.
$_transparentIndices
private array SetaPDF_Core_Image_Gif_Frame::$_transparentIndices
The transparent indices.
Methods
__construct()
public SetaPDF_Core_Image_Gif_Frame::__construct (
SetaPDF_Core_Image_Gif_Reader $reader, SetaPDF_Core_Image_Gif_Block_ImageDescriptor $image, array $transparentIndices [, SetaPDF_Core_Image_Gif_Frame|null $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|null
- $delayTime : int
_applyPixels()
private SetaPDF_Core_Image_Gif_Frame::_applyPixels (
string &$stream, string|null &$transparencyMask, int|null &$transparencyPixelCount, int[] $pixels, string[] $colorTable
): voidApplies all the pixel changes onto the stream.
Parameters
- $stream : string
- $transparencyMask : string|null
- $transparencyPixelCount : int|null
- $pixels : int[]
- $colorTable : string[]
_createMaskStream()
private SetaPDF_Core_Image_Gif_Frame::_createMaskStream (
string $transparencyMask
): SetaPDF_Core_Type_StreamCreates a SMask for the current image.
Parameters
- $transparencyMask : string
_ensureStream()
private SetaPDF_Core_Image_Gif_Frame::_ensureStream (
string|null &$stream, string|null &$transparencyMask [, int|null &$transparencyPixelCount = null ]
): voidEnsures that the stream is the read stream.
Parameters
- $stream : string|null
- $transparencyMask : string|null
- $transparencyPixelCount : int|null
Exceptions
Throws SetaPDF_Core_Image_Exception
_getColorTable()
_readStream()
private SetaPDF_Core_Image_Gif_Frame::_readStream (
string|null &$stream, string|null &$transparencyMask, int|null &$transparencyPixelCount
): voidReads the current stream and renders it onto the image stream.
Parameters
- $stream : string|null
- $transparencyMask : string|null
- $transparencyPixelCount : int|null
Exceptions
Throws SetaPDF_Core_Image_Exception
toXObject()
public SetaPDF_Core_Image_Gif_Frame::toXObject (
SetaPDF_Core_Document $document
): SetaPDF_Core_XObject_ImageCreates a XObject using the stored frame data.
Parameters
- $document : SetaPDF_Core_Document
Exceptions
Throws SetaPDF_Core_Image_Exception