Cargo Features

[dependencies]
zengif = { version = "0.6.0", default-features = false, features = ["std", "quantizr", "imagequant", "color_quant", "exoquant-deprecated", "imgref-interop"] }
default = std

The std feature is set by default whenever zengif is added without default-features = false somewhere in the dependency tree.

std default

std feature - enables std::error::Error impl and std I/O traits Disable for no_std+alloc environments (e.g., WASM)

Enables std of enough ^0.3

Cooperative cancellation (no_std compatible)

and std of gif

Core GIF codec (no_std compatible with alloc)

and std of whereat

Error tracing for production debugging (no_std compatible)

Affects zengif::heuristics

quantizr

Color quantization backends (choose one or more)
quantizr: Best quality, fast, MIT licensed (RECOMMENDED)

Enables quantizr

Affects config::EncoderConfig.quality, config::EncoderConfig.dithering, config::EncoderConfig.shared_palette, config::EncoderConfig.max_buffer_frames, config::EncoderConfig.max_buffer_bytes, config::EncoderConfig.quantizer_backend, config::EncoderConfig.quantizer, config::EncoderConfig.palette_error_threshold, encode::encode_gif_shared_palette, encode::encode_gif_with_quantizer, quantize::Quantizer

imagequant

imagequant: Best compression (smallest files), GPL-3.0-or-later licensed Note: GPL requires source disclosure. Commercial license: https://pngquant.org

Enables imagequant

Color quantization backends (optional)

Affects config::EncoderConfig.quality, config::EncoderConfig.dithering, config::EncoderConfig.shared_palette, config::EncoderConfig.max_buffer_frames, config::EncoderConfig.max_buffer_bytes, config::EncoderConfig.quantizer_backend, config::EncoderConfig.quantizer, config::EncoderConfig.palette_error_threshold, encode::encode_gif_shared_palette, encode::encode_gif_with_quantizer, quantize::Quantizer

color_quant

color_quant: Fastest encoder, MIT licensed (good for high-throughput)

Enables color_quant

Affects config::EncoderConfig.quality, config::EncoderConfig.dithering, config::EncoderConfig.shared_palette, config::EncoderConfig.max_buffer_frames, config::EncoderConfig.max_buffer_bytes, config::EncoderConfig.quantizer_backend, config::EncoderConfig.quantizer, config::EncoderConfig.palette_error_threshold, encode::encode_gif_shared_palette, encode::encode_gif_with_quantizer, quantize::Quantizer

exoquant-deprecated

exoquant-deprecated: Slow K-Means quantizer, kept for compatibility Use quantizr instead (faster AND better quality)

Enables exoquant

Affects config::EncoderConfig.quality, config::EncoderConfig.dithering, config::EncoderConfig.shared_palette, config::EncoderConfig.max_buffer_frames, config::EncoderConfig.max_buffer_bytes, config::EncoderConfig.quantizer_backend, config::EncoderConfig.quantizer, config::EncoderConfig.palette_error_threshold, encode::encode_gif_shared_palette, encode::encode_gif_with_quantizer, quantize::Quantizer

imgref-interop = imgref

RGB/imgref ecosystem interop

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

imgref imgref-interop?