class GifHelper

Methods

open($imageFile)

No description

load(string $bin)

No description

bool
isAnimated(GifByteStream $bytes)

No description

string
encode(array $data)

Encode data into GIF hex string.

array
decode(GifByteStream $bytes)

Decode GIF into array of data for easy use in PHP userland.

array
decodeToBlocks(GifByteStream $bytes)

Decompose GIF into its block components. The GIF blocks are in the order that they appear in the byte stream.

array
expandBlocks(array $blocks)

Expand GIF blocks into useful info.

array
splitFrames(array $blocks)

No description

array
resize($blocks, $newW, $newH)

No description

Details

at line line 12
GifByteStream open($imageFile)

Parameters

$imageFile

Return Value

GifByteStream

Exceptions

Exception

at line line 33
GifByteStream load(string $bin)

Parameters

string $bin Raw binary data from imagegif or filegetcontents

Return Value

GifByteStream

at line line 45
bool isAnimated(GifByteStream $bytes)

Parameters

GifByteStream $bytes

Return Value

bool

at line line 66
string encode(array $data)

Encode data into GIF hex string.

Parameters

array $data The array returned by decode.

Return Value

string Hex string of GIF

at line line 149
array decode(GifByteStream $bytes)

Decode GIF into array of data for easy use in PHP userland.

Parameters

GifByteStream $bytes Decode byte stream into array of GIF blocks.

Return Value

array Array containing GIF data

Exceptions

Exception

at line line 164
array decodeToBlocks(GifByteStream $bytes)

Decompose GIF into its block components. The GIF blocks are in the order that they appear in the byte stream.

Parameters

GifByteStream $bytes

Return Value

array

Exceptions

Exception

at line line 341
array expandBlocks(array $blocks)

Expand GIF blocks into useful info.

Parameters

array $blocks Accepts the array returned by decodeToBlocks

Return Value

array

at line line 453
array splitFrames(array $blocks)

Parameters

array $blocks The array returned by decode.

Return Value

array Array of images each containing 1 of each frames of the original image.

at line line 477
array resize($blocks, $newW, $newH)

Parameters

$blocks
$newW
$newH

Return Value

array $blocks