Method | Description | |
---|---|---|
decode ( GifByteStream $bytes ) : array | Decode GIF into array of data for easy use in PHP userland. | |
decodeToBlocks ( GifByteStream $bytes ) : array | Decompose GIF into its block components. The GIF blocks are in the order that they appear in the byte stream. | |
encode ( array $data ) : string | Encode data into GIF hex string. | |
expandBlocks ( array $blocks ) : array | Expand GIF blocks into useful info. | |
isAnimated ( GifByteStream $bytes ) : boolean | ||
load ( string $bin ) : GifByteStream | ||
open ( $imageFile ) : GifByteStream | ||
resize ( $blocks, $newW, $newH ) : array | ||
splitFrames ( array $blocks ) : array |
Method | Description | |
---|---|---|
_asciiToHex ( $asciiString ) : string | ||
_fixSize ( $string, $size, string $char = '0' ) : string | ||
_hexToAscii ( $hexString ) : string | ||
_hexToBin ( $hexString ) : string | ||
_switchEndian ( $hexString ) : string |
public decode ( GifByteStream $bytes ) : array | ||
$bytes | GifByteStream | Decode byte stream into array of GIF blocks. |
return | array | Array containing GIF data |
public decodeToBlocks ( GifByteStream $bytes ) : array | ||
$bytes | GifByteStream | |
return | array |
public expandBlocks ( array $blocks ) : array | ||
$blocks | array | Accepts the array returned by decodeToBlocks |
return | array |
public isAnimated ( GifByteStream $bytes ) : boolean | ||
$bytes | GifByteStream | |
return | boolean |
public load ( string $bin ) : GifByteStream | ||
$bin | string | Raw binary data from imagegif or file_get_contents |
return | GifByteStream |
public splitFrames ( array $blocks ) : array | ||
$blocks | array | The array returned by decode. |
return | array | Array of images each containing 1 of each frames of the original image. |