Tools for gif data.
Static methods
staticextractBGRA(data:Data, frameIndex:Int):Bytes
Extracts frame pixel data in Blue-Green-Red-Alpha pixel format. This function extracts only exact frame and does put previous frame pixel data into resulting Bytes. Note that frame size may not equal to Gif logical screen size.
Parameters:
data | Gif data. |
---|---|
frameIndex | Frame index. |
Returns:
BGRA pixel data with dimensions equals to specified Frame size. If frame does not present in Gif data returns null.
staticextractFullBGRA(data:Data, frameIndex:Int):Bytes
Extracts full Gif pixel data to specified frame in Blue-Green-Red-Alpha pixel format. This functions returns full representation of frame including rendering of all other frames before.
Parameters:
data | Gif data. |
---|---|
frameIndex | Frame index. |
Returns:
BGRA pixel data with dimensions equals to Gif logical screen with full pixel data of Gif image at specified frame.
staticextractFullRGBA(data:Data, frameIndex:Int):Bytes
Extracts full Gif pixel data to specified frame in Red-Green-Blue-Alpha pixel format. This functions returns full representation of frame including rendering of all other frames before.
Parameters:
data | Gif data. |
---|---|
frameIndex | Frame index. |
Returns:
RGBA pixel data with dimensions equals to Gif logical screen with full pixel data of Gif image at specified frame.
staticextractRGBA(data:Data, frameIndex:Int):Bytes
Extracts frame pixel data in Red-Green-Blue-Alpha pixel format. This function extracts only exact frame and does put previous frame pixel data into resulting Bytes. Note that frame size may not equal to Gif logical screen size.
Parameters:
data | Gif data. |
---|---|
frameIndex | Frame index. |
Returns:
RGBA pixel data with dimensions equals to specified Frame size. If frame does not present in Gif data returns null.
staticframe(data:Data, frameIndex:Int):Frame
Returns frame at given index.
Parameters:
data | Gif data. |
---|---|
frameIndex | Index of frame. |
Returns:
Frame at given index or null, if there is no frame at that index.
staticgraphicControl(data:Data, frameIndex:Int):GraphicControlExtension
Returns Graphic Control extension for frame at given index.
Parameters:
data | Gif data. |
---|---|
frameIndex | Index of frame. |
Returns:
GCE extension if it is exists for given frame, null otherwise.
staticloopCount(data:Data):Int
Returns amount of animation repeats stored in Gif data. This is link to Netscape Looping application extension. If this extension does not present amount of loops equals to 1.
Parameters:
data | Gif data. |
---|
Returns:
Amount of animation repeats. Zero equals to infinite amount of repeats.