webp_anim/lib.rs
1#![warn(missing_docs)]
2
3//! Inspect, decode, resize, and encode animated WebP images.
4//!
5//! The crate exposes container inspection, sequential full-canvas RGBA decoding,
6//! reusable animation-frame resizing, and sequential animated-WebP encoding.
7//! Frame durations are passed through without playback-time normalization.
8//!
9//! The high-level [`transcode_animated_webp`] function composes those stages for
10//! one stored animation sequence. Applications that need different resource,
11//! compression, or output-selection policies can use the lower-level types
12//! directly.
13
14/// Lower-level WebP animation decoder and encoder primitives.
15pub mod codec;
16/// WebP container classification and metadata inspection.
17pub mod inspect;
18/// Shared data types describing canvases, frames, and animation metadata.
19pub mod model;
20/// Reusable aspect-ratio-preserving RGBA resize plans and workspaces.
21pub mod resize;
22/// The sequential decode-resize-encode convenience pipeline.
23pub mod transcode;
24
25pub use codec::decode::{AnimationDecoder, DecodeError, DecodeLimits};
26pub use codec::encode::{
27 AnimationEncoder, AnimationEncoderOptions, AnimationMuxOverrides, EncodeError,
28 EncoderConfigOverrides,
29};
30pub use inspect::{InspectError, InspectLimits, WebpKind, inspect, is_animated_webp_fast};
31pub use model::{
32 AnimationFrame, AnimationInfo, BackgroundColor, CanvasSize, LoopCount, StaticWebpInfo,
33};
34pub use resize::{ResizeError, ResizeFilter, ResizeOptions, ResizePlan, ResizeWorkspace};
35pub use transcode::{
36 AnimationTranscodeOptions, TranscodeError, TranscodedAnimation, transcode_animated_webp,
37};