interface GIF {
    applicationExtensions: ApplicationExtension[];
    backgroundImage: ImageData;
    colorRes: number;
    comments: [number, string][];
    frames: Frame[];
    globalColorTable: IRgb[];
    height: number;
    pixelAspectRatio: number;
    sortFlag: boolean;
    totalTime: number;
    width: number;
}

Properties

applicationExtensions: ApplicationExtension[]

all application extensions found

backgroundImage: ImageData

an image filled with the background color (can be used as a background before the first frame) - if the global color table is not available this is transparent black

colorRes: number

the color depth/resolution in bits per color (in the original) [1-8 bits]

comments: [number, string][]

comments in the file and on with frame they where found

frames: Frame[]

each frame of the GIF (decoded into single images)

globalColorTable: IRgb[]

the global color table for the GIF

height: number

the height of the image in pixels (logical screen size)

pixelAspectRatio: number

if non-zero the pixel aspect ratio will be from 4:1 to 1:4 in 1/64th increments

sortFlag: boolean

if the colors in the global color table are ordered after decreasing importance

totalTime: number

the total duration of the gif in milliseconds (all delays added together) - will be Infinity if there is a frame with 0 delay

width: number

the width of the image in pixels (logical screen size)