Factory
class Factory(maxCacheableAnimationBytes: Long = DEFAULT_MAX_CACHEABLE_ANIMATION_BYTES, colorTarget: ColorTarget = ColorTarget.Srgb()) : Decoder.Factory(source)
maxCacheableAnimationBytes: animations whose decoded pixel bytes (frames × width × height × 4) fit under this threshold are marked shareable, so Coil's memory cache keeps them and revisits skip the re-decode entirely. Animations above it stay unshareable (decode again from the disk cache on revisit) so a single huge GIF cannot evict everything else. 0 restores the old always-skip behavior; Long.MAX_VALUE caches unconditionally.
colorTarget: the colour space every image of this factory decodes to. sRGB by default; ColorTarget.Source keeps the samples as stored.
Constructors
Link copied to clipboard
constructor(maxCacheableAnimationBytes: Long = DEFAULT_MAX_CACHEABLE_ANIMATION_BYTES, colorTarget: ColorTarget = ColorTarget.Srgb())