Cargo Features

PNG has no features set by default.

[dependencies]
png = { version = "0.18.0-rc", features = ["unstable", "zlib-rs", "benchmarks"] }
unstable

Use nightly-only features for a minor performance boost in PNG decoding

Enables nightly of crc32fast

zlib-rs

Use zlib-rs for faster PNG encoding at the cost of some unsafe code. WARNING: this changes the flate2 backend for your entire dependency tree! While the png crate always uses fully memory-safe decoding, this enables zlib-rs and introduces some unsafe code to all other crates that rely on flate2, including the decoding codepaths.

Enables zlib-rs of flate2

benchmarks

Affects png::benchable_apis