#png #decoder

png-decoder

A pure-Rust, no_std compatible PNG decoder

2 releases

0.1.1 Oct 9, 2022
0.1.0 Jan 3, 2021

#1035 in Images

Download history 123/week @ 2024-11-29 186/week @ 2024-12-06 197/week @ 2024-12-13 239/week @ 2024-12-20 237/week @ 2024-12-27 251/week @ 2025-01-03 328/week @ 2025-01-10 332/week @ 2025-01-17 272/week @ 2025-01-24 341/week @ 2025-01-31 312/week @ 2025-02-07 298/week @ 2025-02-14 405/week @ 2025-02-21 389/week @ 2025-02-28 481/week @ 2025-03-07 359/week @ 2025-03-14

1,695 downloads per month
Used in 10 crates (3 directly)

MIT OR Apache-2.0 OR Zlib

39KB
837 lines

png-decoder

A pure-Rust, no_std compatible PNG decoder.

See examples/basic.rs for basic usage. The decode() function returns a PNG header and associated byte data, represented as RGBA (8 bits per channel).

Dependencies

  • cargo
  • rustc

Build

$ cargo build --release

Testing

$ cargo test

Code Format

The formatting options currently use nightly-only options.

$ cargo +nightly fmt

Code Linting

$ cargo clippy

Code Fuzzing

Fuzzing requires a nightly toolchain. Fuzzing for this project is currently confirmed to work with:

+nightly-2020-10-07

Running

cargo install cargo-fuzz
cargo +nightly-2020-10-07 fuzz run png_decoder_fuzzer

Dependencies

~2MB
~44K SLoC