writeFrame

Writes a single frame to the GIF. The frame may be skipped if the duration is below minimumFrameDurationCentiseconds, or if the frame is the same as or similar enough to the previous frame, determined by colorDifferenceTolerance, quantizedColorDifferenceTolerance, and colorSimilarityChecker.

Parameters

image

The ImageBitmap containing the pixel data of the frame.

duration

The duration of the frame.

Throws

If an I/O error occurs.

suspend fun ParallelGifEncoder.writeFrame(image: ImageBitmap, duration: Duration)(source)

Writes a single frame to the GIF. The frame may be skipped if the duration is below minimumFrameDurationCentiseconds, or if the frame is the same as or similar enough to the previous frame, determined by colorDifferenceTolerance, quantizedColorDifferenceTolerance, and colorSimilarityChecker.

Parameters

image

The ImageBitmap containing the pixel data of the frame.

duration

The duration of the frame.

Throws

If an I/O error occurs.