Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/image-rs/jpeg-decoder
JPEG decoder written in Rust
https://github.com/image-rs/jpeg-decoder
hacktoberfest
Last synced: about 2 months ago
JSON representation
JPEG decoder written in Rust
- Host: GitHub
- URL: https://github.com/image-rs/jpeg-decoder
- Owner: image-rs
- License: apache-2.0
- Created: 2016-02-10T13:36:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-13T20:17:55.000Z (8 months ago)
- Last Synced: 2024-04-24T16:10:35.981Z (5 months ago)
- Topics: hacktoberfest
- Language: Rust
- Homepage:
- Size: 18.7 MB
- Stars: 146
- Watchers: 12
- Forks: 86
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
**WARNING: This crate is in maintenance mode as _image-rs_ seeks to move over to the zune-jpeg crate. However, since other Rust JPEG crates do not support lossless mode, we will continue to welcome PRs related to that functionality.**
---
# jpeg-decoder[![Rust CI](https://github.com/image-rs/jpeg-decoder/workflows/Rust%20CI/badge.svg)](https://github.com/image-rs/jpeg-decoder/actions)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/k65rrkd0f8yb4o9w/branch/master?svg=true)](https://ci.appveyor.com/project/kaksmet/jpeg-decoder/branch/master)
[![crates.io](https://img.shields.io/crates/v/jpeg-decoder.svg)](https://crates.io/crates/jpeg-decoder)A Rust library for decoding JPEGs.
[Documentation](https://docs.rs/jpeg-decoder)
## Example
Cargo.toml:
```toml
[dependencies]
jpeg-decoder = "0.3"
```main.rs:
```rust
extern crate jpeg_decoder as jpeg;use std::fs::File;
use std::io::BufReader;fn main() {
let file = File::open("hello_world.jpg").expect("failed to open file");
let mut decoder = jpeg::Decoder::new(BufReader::new(file));
let pixels = decoder.decode().expect("failed to decode image");
let metadata = decoder.info().unwrap();
}
```## Requirements
This crate compiles with Rust >= 1.61. Minimum supported Rust version:
- All releases `0.1.*` compile with Rust >= 1.36.
- All releases `0.2.*` compile with Rust >= 1.48.