#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

#396 in Images

Download history 200/week @ 2024-10-16 125/week @ 2024-10-23 353/week @ 2024-10-30 315/week @ 2024-11-06 160/week @ 2024-11-13 141/week @ 2024-11-20 121/week @ 2024-11-27 163/week @ 2024-12-04 230/week @ 2024-12-11 190/week @ 2024-12-18 261/week @ 2024-12-25 228/week @ 2025-01-01 273/week @ 2025-01-08 379/week @ 2025-01-15 258/week @ 2025-01-22 308/week @ 2025-01-29

1,250 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