Skip to main content

Module image

Module image 

Source
Expand description

Image handling and format support

This module provides the Image type for holding barcode image data. Images must be in grayscale format (8-bit luminance).

§Example

use zedbar::{Image, Scanner};

// Create image from grayscale data
let width = 640;
let height = 480;
let data = vec![0u8; (width * height) as usize];
let mut image = Image::from_gray(&data, width, height).unwrap();

// Scan the image
let mut scanner = Scanner::new();
let symbols = scanner.scan(&mut image);

Structs§

Image
An image containing barcode data