| 1 | # PNG Decoder/Encoder |
| 2 | [](https://github.com/image-rs/image-png/actions) |
| 3 | [](https://docs.rs/png) |
| 4 | [](https://crates.io/crates/png) |
| 5 | [](https://github.com/image-rs/image-png) |
| 6 | |
| 7 | Robust and performant PNG decoder/encoder in pure Rust. Also supports [APNG](https://en.wikipedia.org/wiki/APNG). |
| 8 | |
| 9 | No `unsafe` code, battle-tested, and fuzzed on [OSS-fuzz](https://github.com/google/oss-fuzz). |
| 10 | |
| 11 | ## Performance |
| 12 | |
| 13 | Performance is typically on par with or better than libpng. |
| 14 | |
| 15 | 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. |
| 16 | |
| 17 | On nightly Rust compiler you can slightly speed up decoding of some images by enabling the `unstable` feature of this crate. |
| 18 | |
| 19 | ## License |
| 20 | |
| 21 | Licensed under either of |
| 22 | |
| 23 | * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0) |
| 24 | * MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT) |
| 25 | |
| 26 | at your option. |
| 27 | |
| 28 | ### Contribution |
| 29 | |
| 30 | Unless you explicitly state otherwise, any contribution intentionally submitted |
| 31 | for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any |
| 32 | additional terms or conditions. |