https://github.com/image-rs/image-png
PNG decoding and encoding library in pure Rust
https://github.com/image-rs/image-png
hacktoberfest
Last synced: about 1 year ago
JSON representation
PNG decoding and encoding library in pure Rust
- Host: GitHub
- URL: https://github.com/image-rs/image-png
- Owner: image-rs
- License: apache-2.0
- Created: 2015-05-03T16:55:38.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T02:26:48.000Z (over 1 year ago)
- Last Synced: 2025-04-29T13:13:41.767Z (about 1 year ago)
- Language: Rust
- Homepage: https://docs.rs/png
- Size: 11.9 MB
- Stars: 418
- Watchers: 45
- Forks: 146
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# PNG Decoder/Encoder
[](https://github.com/image-rs/image-png/actions)
[](https://docs.rs/png)
[](https://crates.io/crates/png)
[](https://github.com/image-rs/image-png)
Robust and performant PNG decoder/encoder in pure Rust. Also supports [APNG](https://en.wikipedia.org/wiki/APNG).
No `unsafe` code, battle-tested, and fuzzed on [OSS-fuzz](https://github.com/google/oss-fuzz).
## Performance
Performance is typically on par with or better than libpng.
Includes a fast encoding mode powered by [fdeflate](https://crates.io/crates/fdeflate) that is dramatically faster than the fastest mode of libpng while *simultaneously* providing better compression ratio.
On nightly Rust compiler you can slightly speed up decoding of some images by enabling the `unstable` feature of this crate.
## License
Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.