Expand description

JPEG encoder

Using the encoder

use jpeg_encoder::{Encoder, ColorType};

// An array with 4 pixels in RGB format.
let data = [
    255,0,0,
    0,255,0,
    0,0,255,
    255,255,255,
];

// Create new encoder that writes to a file with maximum quality (100)
let mut encoder = Encoder::new_file("some.jpeg", 100)?;

// Encode the data with dimension 2x2
encoder.encode(&data, 2, 2, ColorType::Rgb)?;

Structs

The JPEG encoder

Enums

Color types for input images

Density settings

The error type for encoding

Color types used in encoding

Quantization table used for encoding

Sampling factors for chroma subsampling

Traits

Buffer used as input value for image encoding

A no_std alternative for std::io::Write

Functions

Conversion from CMYK to YCCK (YCbCrK)

Conversion from RGB to YCbCr