#png #image #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

#793 in Images

Download history 106/week @ 2024-07-27 154/week @ 2024-08-03 183/week @ 2024-08-10 158/week @ 2024-08-17 90/week @ 2024-08-24 245/week @ 2024-08-31 134/week @ 2024-09-07 171/week @ 2024-09-14 244/week @ 2024-09-21 201/week @ 2024-09-28 131/week @ 2024-10-05 167/week @ 2024-10-12 149/week @ 2024-10-19 285/week @ 2024-10-26 382/week @ 2024-11-02 150/week @ 2024-11-09

982 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
~42K SLoC