pub fn process_image(
input: &[u8],
options: ImageProcessingOptions,
) -> Result<Vec<u8>, String>Expand description
Process an image according to the given options.
§Arguments
input- Raw image bytes (PNG, JPEG, WebP, etc.)options- Processing options (resize, format, EXIF stripping)
§Returns
Ok(Vec<u8>)- Processed image bytesErr(String)- Processing failed
§Example
use rpi_tools::image_processing::{process_image, ImageProcessingOptions, OutputFormat};
let options = ImageProcessingOptions {
max_width: Some(800),
max_height: Some(600),
format: Some(OutputFormat::Jpeg { quality: 85 }),
strip_exif: true,
};
let processed = process_image(raw_bytes, options)?;