PHP 클래스 Grafika\Gd\Helper\GifHelper

파일 보기 프로젝트 열기: kosinix/grafika 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
_asciiToHex ( $asciiString ) : string
_fixSize ( $string, $size, string $char = '0' ) : string
_hexToAscii ( $hexString ) : string
_hexToBin ( $hexString ) : string
_switchEndian ( $hexString ) : string

메소드 상세

decode() 공개 메소드

Decode GIF into array of data for easy use in PHP userland.
public decode ( GifByteStream $bytes ) : array
$bytes GifByteStream Decode byte stream into array of GIF blocks.
리턴 array Array containing GIF data

decodeToBlocks() 공개 메소드

Decompose GIF into its block components. The GIF blocks are in the order that they appear in the byte stream.
public decodeToBlocks ( GifByteStream $bytes ) : array
$bytes GifByteStream
리턴 array

encode() 공개 메소드

Encode data into GIF hex string.
public encode ( array $data ) : string
$data array The array returned by decode.
리턴 string Hex string of GIF

expandBlocks() 공개 메소드

Expand GIF blocks into useful info.
public expandBlocks ( array $blocks ) : array
$blocks array Accepts the array returned by decodeToBlocks
리턴 array

isAnimated() 공개 메소드

public isAnimated ( GifByteStream $bytes ) : boolean
$bytes GifByteStream
리턴 boolean

load() 공개 메소드

public load ( string $bin ) : GifByteStream
$bin string Raw binary data from imagegif or file_get_contents
리턴 GifByteStream

open() 공개 메소드

public open ( $imageFile ) : GifByteStream
$imageFile
리턴 GifByteStream

resize() 공개 메소드

public resize ( $blocks, $newW, $newH ) : array
$blocks
$newW
$newH
리턴 array $blocks

splitFrames() 공개 메소드

public splitFrames ( array $blocks ) : array
$blocks array The array returned by decode.
리턴 array Array of images each containing 1 of each frames of the original image.