Skip to content

c5soft/rust-turbojpeg

 
 

Repository files navigation

turbojpeg

Rust bindings for TurboJPEG, which provides simple and fast operations for JPEG images:

  • Compression (encoding)
  • Decompression (decoding)
  • Lossless transformations

Usage with image-rs

To quickly encode and decode images from the image crate, add this to the [dependencies] section in your Cargo.toml:

turbojpeg = {version = "0.5", features = ["image"]}

and then use the functions turbojpeg::decompress_image and turbojpeg::compress_image.

For more advanced usage without the image crate, please see the documentation.

Requirements

The low-level binding to libturbojpeg is provided by the crate turbojpeg-sys, which needs to link to the C library. Typically, you will need a C compiler and NASM to build the library from source, but see its README for details.

Contributing

All contributions are welcome! Please contact me (@honzasp) or open a pull request. This crate is rather minimal, the main areas of improvement are:

  • Improving the build process of turbojpeg-sys crate, so that it works seamlessly on a wide range of systems.
  • Testing.
  • Extending the safe Rust API provided by turbojpeg crate.

License

This software is released into the public domain or is available with the MIT license (your choice).

About

Rust bindings for TurboJPEG library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.9%
  • Other 0.1%