Skip to main content

image_webp/
lib.rs

1//! Decoding and Encoding of WebP Images
2
3#![forbid(unsafe_code)]
4#![deny(missing_docs)]
5// Increase recursion limit for the `quick_error!` macro.
6#![recursion_limit = "256"]
7// Enable nightly benchmark functionality if "_benchmarks" feature is enabled.
8#![cfg_attr(all(test, feature = "_benchmarks"), feature(test))]
9#[cfg(all(test, feature = "_benchmarks"))]
10extern crate test;
11
12pub use decoder::{DecodingError, LoopCount, UpsamplingMethod, WebPDecodeOptions, WebPDecoder};
13pub use encoder::{ColorType, EncodingError, WebPEncoder};
14pub use lossless::EncoderParams;
15
16mod alpha_blending;
17mod decoder;
18mod encoder;
19mod extended;
20mod lossless;
21mod lossy;
22
23/// An implementation of the VP8 Video Codec
24///
25/// This module contains a partial implementation of the
26/// VP8 video format as defined in RFC-6386.
27///
28/// It decodes Keyframes only.
29/// VP8 is the underpinning of the WebP image format
30///
31/// # Related Links
32/// * [rfc-6386](http://tools.ietf.org/html/rfc6386) - The VP8 Data Format and Decoding Guide
33/// * [VP8.pdf](http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/37073.pdf) - An overview of of the VP8 format
34pub mod vp8 {
35    pub use crate::lossy::{Frame, Vp8Decoder};
36}