4 releases (2 breaking)

Uses old Rust 2015

0.3.0 Feb 2, 2019
0.2.0 Sep 25, 2018
0.1.1 Dec 12, 2017
0.1.0 Dec 12, 2017

#885 in Images

Download history 2/week @ 2024-02-19 7/week @ 2024-02-26 66/week @ 2024-04-01

66 downloads per month

GPL-3.0 license

8.5MB
184K SLoC

C 158K SLoC // 0.2% comments C++ 21K SLoC // 0.2% comments Java 2K SLoC // 0.2% comments Shell 800 SLoC // 0.1% comments TCL 677 SLoC // 0.0% comments Rust 428 SLoC // 0.0% comments Visual Studio Project 348 SLoC Python 197 SLoC // 0.3% comments Visual Studio Solution 28 SLoC

Rust bindings to OpenJPEG

This crate provides access to OpenJPEG's JPEG2000 decoder.

Warning

** This crate is still fairly experimental. ** (And it's the first time I'm writing unsafe Rust code :o)

Please be advised that using C code means this crate is likely vulnerable to various memory exploits, e.g. see http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-8332 for an actual example from the past.

As soon as someone writes an efficient JPEG2000 decoder in pure Rust you should probably switch over to that.

Examples

Run the examples from within the examples directory, using cargo run --example name.

License

Most of the code in this repository is provided under the GPL license (check out the relevant's files headers for more details). However note that this crate links statically to OpenJPEG which has its own (permissive) license, which you can find at openjp2-sys/libopenjpeg/LICENSE (you might have to check out the git submodule first).

Dependencies

~15MB
~119K SLoC