#png #codec #bindings

deprecated sys libpng-sys

Unreliable bindings for libpng 1.6. They're likely to bring sorrow and regret. Please use a native Rust PNG library instead.

4 stable releases

1.1.11 Oct 31, 2025
1.1.10 Dec 7, 2024
1.1.9 Aug 15, 2022
1.1.8 Oct 2, 2019
0.1.1 Jun 16, 2017

#187 in #codec

Download history 417/week @ 2025-09-30 369/week @ 2025-10-07 388/week @ 2025-10-14 270/week @ 2025-10-21 344/week @ 2025-10-28 250/week @ 2025-11-04 135/week @ 2025-11-11 313/week @ 2025-11-18 174/week @ 2025-11-25 402/week @ 2025-12-02 204/week @ 2025-12-09 137/week @ 2025-12-16 347/week @ 2025-12-23 62/week @ 2025-12-30 162/week @ 2026-01-06 158/week @ 2026-01-13

750 downloads per month
Used in 2 crates

Libpng license

1MB
24K SLoC

C 23K SLoC // 0.2% comments Rust 1K SLoC // 0.0% comments GNU Style Assembly 25 SLoC // 0.5% comments

This is not the documentation you're looking for

See libpng documentation instead.

Consider using a native Rust PNG library instead (e.g. LodePNG 2.x).


Rust bindings for libpng 1.6

libpng is likely to bring sorrow and regret. I strongly recommend to use a native Rust PNG library instead (e.g. LodePNG).

This crate bundles libpng 1.6.50 as a fallback. Please check whether this version is still secure before using this package.

If you add it as a build dependency, Cargo will make DEP_PNG_INCLUDE env var available, containing a path to a directory with png.h.

You may need use libpng_sys as _; in your Rust program to ensure it's "used" and actually linked.

Dependencies

~0.8–1.2MB
~23K SLoC