commit | 95550d7eec747b94b5f9beba3be2c6fcb1f4f70e | [log] [tgz] |
---|---|---|
author | Richard Viney <richard.viney@gmail.com> | Fri Mar 07 02:46:20 2025 |
committer | GitHub <noreply@github.com> | Fri Mar 07 02:46:20 2025 |
tree | 9ca83365f901462db78c847815c66174c8a7a58c | |
parent | e70564bbff4f9fefcee72efad5874fddd0d6a83d [diff] |
Fix panic when prediction calculation is invalid (#282)
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.
A Rust library for decoding JPEGs.
Cargo.toml:
[dependencies] jpeg-decoder = "0.3"
main.rs:
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(); }
This crate compiles with Rust >= 1.61. Minimum supported Rust version:
0.1.*
compile with Rust >= 1.36.0.2.*
compile with Rust >= 1.48.