#png #bindings #ffi #codec

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.

3 stable releases

1.1.10 Dec 7, 2024
1.1.9 Aug 15, 2022
1.1.8 Oct 2, 2019
1.1.6 Jul 27, 2019
0.1.1 Jun 16, 2017

#193 in #png

Download history 398/week @ 2024-08-29 223/week @ 2024-09-05 327/week @ 2024-09-12 302/week @ 2024-09-19 522/week @ 2024-09-26 416/week @ 2024-10-03 308/week @ 2024-10-10 172/week @ 2024-10-17 171/week @ 2024-10-24 198/week @ 2024-10-31 235/week @ 2024-11-07 240/week @ 2024-11-14 268/week @ 2024-11-21 148/week @ 2024-11-28 335/week @ 2024-12-05 209/week @ 2024-12-12

988 downloads per month
Used in pngquant

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

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.44 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.


lib.rs:

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).

Dependencies

~0.8–1.3MB
~26K SLoC