#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

#276 in Images

Download history 24/week @ 2023-02-13 21/week @ 2023-02-20 14/week @ 2023-02-27 36/week @ 2023-03-06 33/week @ 2023-03-13 13/week @ 2023-03-20 13/week @ 2023-03-27 40/week @ 2023-04-03 19/week @ 2023-04-10 11/week @ 2023-04-17 26/week @ 2023-04-24 30/week @ 2023-05-01 21/week @ 2023-05-08 17/week @ 2023-05-15 49/week @ 2023-05-22 30/week @ 2023-05-29

126 downloads per month
Used in pufferfish

MIT OR Apache-2.0 OR Zlib

38KB
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

~1.5MB
~35K SLoC