abrasion/third_party/cargo/vendor/jpeg-decoder-0.1.22
q3k 4a50bbf00d third_party/cargo: re-raze, fix winapi for windows 2021-05-03 23:43:36 +02:00
..
benches third_party/cargo: update 2021-04-03 16:13:10 +00:00
examples third_party/cargo: update 2021-04-03 16:13:10 +00:00
src third_party/cargo: update 2021-04-03 16:13:10 +00:00
.cargo-checksum.json third_party/cargo: update 2021-04-03 16:13:10 +00:00
BUILD.bazel third_party/cargo: re-raze, fix winapi for windows 2021-05-03 23:43:36 +02:00
CHANGELOG.md third_party/cargo: update 2021-04-03 16:13:10 +00:00
Cargo.lock third_party/cargo: update 2021-04-03 16:13:10 +00:00
Cargo.toml third_party/cargo: update 2021-04-03 16:13:10 +00:00
LICENSE-APACHE third_party/cargo: update 2021-04-03 16:13:10 +00:00
LICENSE-MIT third_party/cargo: update 2021-04-03 16:13:10 +00:00
README.md third_party/cargo: update 2021-04-03 16:13:10 +00:00
appveyor.yml third_party/cargo: update 2021-04-03 16:13:10 +00:00

README.md

jpeg-decoder

Rust CI AppVeyor Build Status Crates.io

A Rust library for decoding JPEGs.

Documentation

Example

Cargo.toml:

[dependencies]
jpeg-decoder = "0.1"

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();
}

Requirements

This crate compiles only with rust >= 1.34.