#png #decoder #image

png-decoder

A pure-Rust, no_std compatible PNG decoder

2 releases

0.1.1 Oct 9, 2022
0.1.0 Jan 3, 2021

#344 in Images

Download history 121/week @ 2024-06-10 111/week @ 2024-06-17 113/week @ 2024-06-24 47/week @ 2024-07-01 76/week @ 2024-07-08 114/week @ 2024-07-15 179/week @ 2024-07-22 106/week @ 2024-07-29 154/week @ 2024-08-05 188/week @ 2024-08-12 146/week @ 2024-08-19 123/week @ 2024-08-26 231/week @ 2024-09-02 125/week @ 2024-09-09 223/week @ 2024-09-16 214/week @ 2024-09-23

817 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
~41K SLoC