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§
- Encoder
- The JPEG encoder
Enums§
- Color
Type - Color types for input images
- Density
- Density settings
- Encoding
Error - The error type for encoding
- Jpeg
Color Type - Color types used in encoding
- Quantization
Table Type - Quantization table used for encoding
- Sampling
Factor - Sampling factors for chroma subsampling
Traits§
- Image
Buffer - Buffer used as input value for image encoding
- Jfif
Write - A no_std alternative for
std::io::Write
Functions§
- cmyk_
to_ ycck - Conversion from CMYK to YCCK (YCbCrK)
- rgb_
to_ ycbcr - Conversion from RGB to YCbCr