#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

#363 in Images

Download history 68/week @ 2024-07-04 82/week @ 2024-07-11 111/week @ 2024-07-18 167/week @ 2024-07-25 160/week @ 2024-08-01 139/week @ 2024-08-08 189/week @ 2024-08-15 126/week @ 2024-08-22 146/week @ 2024-08-29 204/week @ 2024-09-05 135/week @ 2024-09-12 282/week @ 2024-09-19 174/week @ 2024-09-26 162/week @ 2024-10-03 125/week @ 2024-10-10 191/week @ 2024-10-17

685 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
~43K SLoC