No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Reynard User f1dc5b6577
Some checks failed
Rust CI / test (1.80.1) (push) Has been cancelled
Rust CI / test (beta) (push) Has been cancelled
Rust CI / test (nightly) (push) Has been cancelled
Rust CI / test (stable) (push) Has been cancelled
Rust CI / test_big_endian (push) Has been cancelled
Rust CI / clippy (push) Has been cancelled
Rust CI / rustfmt (push) Has been cancelled
Rust CI / cargo-semver-checks (push) Has been cancelled
chore: sync dependencies (monorepo)
2026-04-13 10:56:35 +02:00
.github/workflows Revert removal of Frame::keyframe and add cargo-semver-checks in CI (#174) 2026-03-22 13:42:12 -07:00
fuzz Remove bounds checks from color transform hot loop (#133) 2025-06-03 10:10:40 +01:00
src chore: sync dependencies (monorepo) 2026-04-13 10:56:35 +02:00
tests chore: sync dependencies (monorepo) 2026-04-13 10:56:35 +02:00
.gitignore Fix washed out images (#63) 2024-04-11 10:03:26 -07:00
.rustfmt.toml Clippy 2025-01-05 12:52:51 +00:00
Cargo.toml chore: sync dependencies (monorepo) 2026-04-13 10:56:35 +02:00
CHANGES.md Publish v0.2.4 (#157) 2025-08-26 18:39:17 -07:00
LICENSE-APACHE Initial commit 2023-08-20 15:06:45 -07:00
LICENSE-MIT Initial commit 2023-08-20 15:06:45 -07:00
README.md Write a more complete README (#154) 2025-07-27 12:58:02 -07:00

image-webp

crates.io Documentation Build Status

This crate is an independent implementation of the WebP image format, written so that the image crate can have a pure-Rust WebP backend for both encoding and decoding.

Current Status

  • Decoder: Supports all WebP format features including both lossless and lossy compression, alpha channel, and animation. Both the "simple" and "extended" formats are handled, and it exposes methods to extract ICC, EXIF, and XMP chunks. Decoding speed is generally in the range of 70-100% of the speed of libwebp.

  • Encoder: This crate only supports lossless encoding. The encoder implementation is relatively basic which makes it very fast, but it doesn't get as good compression ratios as libwebp can. Nonetheless, it often produces smaller files than PNG, even when compared against the slowest/highest compression options of PNG encoders.

Future possibilities

  • We continue to be interested in optimizations and bug fixes and hope the bring the decoder closer to parity with libwebp.

  • Another potential area is animation encoding. Much of the groundwork is in place for this, but it will require some additional work to implement.

  • We would like to add lossy encoding support, but this is a non-trivial task and would require a lot of work. If you are interested in helping with this, please get in touch!

Unsafe code

Both this crate and all of its dependencies currently contain no unsafe code.

NOTE: This isn't a guarantee that unsafe code will never be added. It may prove necessary in the future to improve performance, but we will always strive to minimize the use of unsafe code and ensure that it is well-tested and documented.

$ cargo geiger

Metric output format: x/y
    x = unsafe code used by the build
    y = total unsafe code found in the crate

Symbols:
    🔒  = No `unsafe` usage found, declares #![forbid(unsafe_code)]
    ❓  = No `unsafe` usage found, missing #![forbid(unsafe_code)]
    ☢️   = `unsafe` usage found

Functions  Expressions  Impls  Traits  Methods  Dependency

0/0        0/0          0/0    0/0     0/0      🔒 image-webp 0.2.3
0/0        0/0          0/0    0/0     0/0      🔒 ├── byteorder-lite 0.1.0
0/0        0/0          0/0    0/0     0/0      ❓ └── quick-error 2.0.1

0/0        0/0          0/0    0/0     0/0