GifEncoderBuilder

actual class GifEncoderBuilder(sink: Sink)(source)

A builder for creating GifEncoder and ParallelGifEncoders.

Parameters

sink

The Sink to write the GIF data to.

expect class GifEncoderBuilder(sink: Sink)(source)

A builder for creating GifEncoders.

Parameters

sink

The Sink to write the GIF data to.

actual class GifEncoderBuilder(sink: Sink)(source)

A builder for creating GifEncoders.

Parameters

sink

The Sink to write the GIF data to.

actual class GifEncoderBuilder(sink: Sink)(source)

A builder for creating GifEncoders.

Parameters

sink

The Sink to write the GIF data to.

Constructors

Link copied to clipboard
actual constructor(sink: Sink)
expect constructor(sink: Sink)
actual constructor(sink: Sink)
actual constructor(sink: Sink)

Properties

Link copied to clipboard
actual var alphaFill: Int

The solid RGB color to use for filling in pixels with partial alpha transparency, as GIFs do not support partial transparency.

expect var alphaFill: Int

The solid RGB color to use for filling in pixels with partial alpha transparency, as GIFs do not support partial transparency.

actual var alphaFill: Int

The solid RGB color to use for filling in pixels with partial alpha transparency, as GIFs do not support partial transparency.

actual var alphaFill: Int

The solid RGB color to use for filling in pixels with partial alpha transparency, as GIFs do not support partial transparency.

Link copied to clipboard

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

Link copied to clipboard

The ColorQuantizer to use for reducing the number of colors in each frame to maxColors.

The ColorQuantizer to use for reducing the number of colors in each frame to maxColors.

The ColorQuantizer to use for reducing the number of colors in each frame to maxColors.

The ColorQuantizer to use for reducing the number of colors in each frame to maxColors.

Link copied to clipboard

The ColorSimilarityChecker to use for determining if two frames are similar enough to merge.

The ColorSimilarityChecker to use for determining if two frames are similar enough to merge.

The ColorSimilarityChecker to use for determining if two frames are similar enough to merge.

The ColorSimilarityChecker to use for determining if two frames are similar enough to merge.

Link copied to clipboard
actual var comment: String

An optional comment to include in the GIF comment block metadata.

expect var comment: String

An optional comment to include in the GIF comment block metadata.

actual var comment: String

An optional comment to include in the GIF comment block metadata.

actual var comment: String

An optional comment to include in the GIF comment block metadata.

Link copied to clipboard

The CoroutineScope in which the concurrent encoding operations will run. Used when creating a ParallelGifEncoder.

The CoroutineScope in which the concurrent encoding operations will run. Used when creating a ParallelGifEncoder.

Link copied to clipboard

The CoroutineScope in which the concurrent encoding operations will run. Used when creating a ParallelGifEncoder.

The CoroutineScope in which the concurrent encoding operations will run. Used when creating a ParallelGifEncoder.

The CoroutineScope in which the concurrent encoding operations will run. Used when creating a ParallelGifEncoder.

Link copied to clipboard

Whether to crop the transparent pixels from the edges of each frame. This can reduce the size of the GIF by a small amount.

Whether to crop the transparent pixels from the edges of each frame. This can reduce the size of the GIF by a small amount.

Whether to crop the transparent pixels from the edges of each frame. This can reduce the size of the GIF by a small amount.

Whether to crop the transparent pixels from the edges of each frame. This can reduce the size of the GIF by a small amount.

Link copied to clipboard

The CoroutineContext to use for writing to the sink. Used when creating a ParallelGifEncoder.

The CoroutineContext to use for writing to the sink. Used when creating a ParallelGifEncoder.

Link copied to clipboard

The CoroutineContext to use for writing to the sink. Used when creating a ParallelGifEncoder.

The CoroutineContext to use for writing to the sink. Used when creating a ParallelGifEncoder.

The CoroutineContext to use for writing to the sink. Used when creating a ParallelGifEncoder.

Link copied to clipboard
actual var loopCount: Int

The number of times the GIF should loop.

expect var loopCount: Int

The number of times the GIF should loop.

actual var loopCount: Int

The number of times the GIF should loop.

actual var loopCount: Int

The number of times the GIF should loop.

Link copied to clipboard
actual var maxColors: Int

The maximum number of colors in each frame.

expect var maxColors: Int

The maximum number of colors in each frame.

actual var maxColors: Int

The maximum number of colors in each frame.

actual var maxColors: Int

The maximum number of colors in each frame.

Link copied to clipboard

The maximum number of frames that can be processed concurrently at the same time. Used when creating a ParallelGifEncoder.

The maximum number of frames that can be processed concurrently at the same time. Used when creating a ParallelGifEncoder.

Link copied to clipboard

The maximum number of frames that can be processed concurrently at the same time. Used when creating a ParallelGifEncoder.

The maximum number of frames that can be processed concurrently at the same time. Used when creating a ParallelGifEncoder.

The maximum number of frames that can be processed concurrently at the same time. Used when creating a ParallelGifEncoder.

Link copied to clipboard

The minimum duration for each frame in centiseconds. Setting this to a value less than 2 can result in the GIF being played slower than expected on some GIF viewers.

The minimum duration for each frame in centiseconds. Setting this to a value less than 2 can result in the GIF being played slower than expected on some GIF viewers.

The minimum duration for each frame in centiseconds. Setting this to a value less than 2 can result in the GIF being played slower than expected on some GIF viewers.

The minimum duration for each frame in centiseconds. Setting this to a value less than 2 can result in the GIF being played slower than expected on some GIF viewers.

Link copied to clipboard

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization after quantization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization after quantization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization after quantization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

The tolerance for color difference used by colorSimilarityChecker when performing transparency optimization after quantization. This optimization works by making pixels that are similar to the pixel in the previous frame transparent, resulting in only pixels that are different being saved. Higher values will result in a smaller file size at the cost of visual artifacts. This optimization is most effective on animations with large static areas.

Link copied to clipboard

The alpha threshold for a pixel to be considered transparent. Pixels with an alpha value equal to or less than this value will be treated as fully transparent.

The alpha threshold for a pixel to be considered transparent. Pixels with an alpha value equal to or less than this value will be treated as fully transparent.

The alpha threshold for a pixel to be considered transparent. Pixels with an alpha value equal to or less than this value will be treated as fully transparent.

The alpha threshold for a pixel to be considered transparent. Pixels with an alpha value equal to or less than this value will be treated as fully transparent.

Functions

Link copied to clipboard
actual fun build(onFrameWritten: (framesWritten: Int, writtenDuration: Duration) -> Unit): GifEncoder

Builds a GifEncoder with the specified parameters.

expect fun build(onFrameWritten: (framesWritten: Int, writtenDuration: Duration) -> Unit = { _, _ -> }): GifEncoder

Builds a GifEncoder with the specified parameters.

actual fun build(onFrameWritten: (framesWritten: Int, writtenDuration: Duration) -> Unit): GifEncoder

Builds a GifEncoder with the specified parameters.

actual fun build(onFrameWritten: (framesWritten: Int, writtenDuration: Duration) -> Unit): GifEncoder

Builds a GifEncoder with the specified parameters.

Link copied to clipboard

Builds a GifEncoder with the specified parameters.

Link copied to clipboard
fun buildParallel(onFrameWritten: suspend (framesWritten: Int, writtenDuration: Duration) -> Unit = { _, _ -> }): ParallelGifEncoder

Builds a ParallelGifEncoder with the specified parameters.

fun buildParallel(onFrameWritten: suspend (framesWritten: Int, writtenDuration: Duration) -> Unit = { _, _ -> }): ParallelGifEncoder

Builds a ParallelGifEncoder with the specified parameters.

Link copied to clipboard
actual fun GifEncoderBuilder.buildParallel(onFrameWritten: suspend (framesWritten: Int, writtenDuration: Duration) -> Unit): ParallelGifEncoder

Builds a ParallelGifEncoder with the specified parameters.

actual fun GifEncoderBuilder.buildParallel(onFrameWritten: suspend (framesWritten: Int, writtenDuration: Duration) -> Unit): ParallelGifEncoder

Builds a ParallelGifEncoder with the specified parameters.

expect fun GifEncoderBuilder.buildParallel(onFrameWritten: suspend (framesWritten: Int, writtenDuration: Duration) -> Unit = { _, _ -> }): ParallelGifEncoder

Builds a ParallelGifEncoder with the specified parameters.

Link copied to clipboard
fun buildParallelFutureCallback(onFrameWritten: (framesWritten: Int, @R|kotlin/ParameterName|(name = String(writtenDuration)) ERROR CLASS: Symbol not found for JavaDuration) -> ERROR CLASS: Symbol not found for CompletionStage<*>): ParallelGifEncoder

Builds a ParallelGifEncoder with the specified parameters.

Link copied to clipboard

Builds a ParallelGifEncoder with the specified parameters.