GifDecoder

constructor(path: ERROR CLASS: Symbol not found for JavaPath, cacheFrameInterval: Int = DEFAULT_GIF_CACHE_FRAME_INTERVAL)(source)

Constructs a GifDecoder, reading GIF data from a file.

Parameters

path

The path of the file containing the GIF data.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.

Throws

If the GIF data is invalid and cannot be decoded.

If an I/O error occurs.


constructor(file: ERROR CLASS: Symbol not found for File, cacheFrameInterval: Int = DEFAULT_GIF_CACHE_FRAME_INTERVAL)(source)

Constructs a GifDecoder, reading GIF data from a file.

Parameters

file

The file containing the GIF data.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.

Throws

If the GIF data is invalid and cannot be decoded.

If an I/O error occurs.


actual constructor(data: RandomAccessData, cacheFrameInterval: Int)(source)

Parameters

data

The RandomAccessData to read the GIF data from.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.


actual constructor(bytes: ByteArray, cacheFrameInterval: Int)(source)

Constructs a GifDecoder, reading GIF data from a byte array.

Parameters

bytes

The byte array containing the GIF data.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.

Throws

If the GIF data is invalid and cannot be decoded.

If an I/O error occurs.

expect constructor(data: RandomAccessData, cacheFrameInterval: Int = DEFAULT_GIF_CACHE_FRAME_INTERVAL)(source)

Parameters

data

The RandomAccessData to read the GIF data from.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.


expect constructor(bytes: ByteArray, cacheFrameInterval: Int = DEFAULT_GIF_CACHE_FRAME_INTERVAL)(source)

Constructs a GifDecoder, reading GIF data from a byte array.

Parameters

bytes

The byte array containing the GIF data.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.

Throws

If the GIF data is invalid and cannot be decoded.

If an I/O error occurs.

actual constructor(data: RandomAccessData, cacheFrameInterval: Int)(source)

Parameters

data

The RandomAccessData to read the GIF data from.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.


actual constructor(bytes: ByteArray, cacheFrameInterval: Int)(source)

Constructs a GifDecoder, reading GIF data from a byte array.

Parameters

bytes

The byte array containing the GIF data.

cacheFrameInterval

The interval at which frames are cached. Setting this to a higher value can improve random access speed with get, but increases memory usage.

Set to 1 to cache every frame, making random access speed similar to that of Array. Warning: this can cause the decoder to use a large amount of memory.

Set to 0 to disable caching, which will decrease the initial load time and minimize memory usage. Disable caching if you only need to read frames sequentially using asSequence or get in increasing order of their index or timestamp.

Throws

If the GIF data is invalid and cannot be decoded.

If an I/O error occurs.