Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
JpegDecoder
✓ use zune_jpeg::JpegDecoder;
Decodes a JPEG file into raw pixel data.
use zune_jpeg::JpegDecoder;
use std::fs::File;
use std::io::Read;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut file = File::open("image.jpg")?;
let mut data = Vec::new();
file.read_to_end(&mut data)?;
let decoder = JpegDecoder::new(&data);
let pixels = decoder.decode()?;
println!("Decoded {} pixels", pixels.len());
Ok(())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.5.14latest on crates.io
Audit
Dependencies
No dependency data recorded yet.