/// Get a list of all strings from all the QR codes in this image.
Get a list of all strings from all the QR codes in this image.
Get a list of all strings from all the QR codes in this image .
fn strings_from_image(img: RgbImage) -> Vec<String> {
    let mut output = Vec::new();
    let mut prep_img = rqrr::PreparedImage::prepare_from_greyscale(img.width() as usize, img.height() as usize, |x, y: usize| -> u8 { img.get_pixel(x as u32, y as u32)[0] });
    let grids = prep_img.detect_grids();
    for grid in grids.iter() {
        match grid.decode() {
            Ok((_meta, content)) => {
                output.push(content);
            },
            Err(e) => {info!("Failed to parse grid's content: {:?}", e);},
        }
    }
    output
}
fn strings_from_image ( img : RgbImage ) -> Vec < String > { let mut output = Vec :: new ( ) ; let mut prep_img = rqrr :: PreparedImage :: prepare_from_greyscale ( img . width ( ) as usize , img . height ( ) as usize , | x , y : usize | -> u8 { img . get_pixel ( x as u32 , y as u32 ) [ 0 ] } ) ; let grids = prep_img . detect_grids ( ) ; for grid in grids . iter ( ) { match grid . decode ( ) { Ok ( ( _meta , content ) ) => { output . push ( content ) ; } , Err ( e ) => { info ! ( " " e ) ; } , } } output }
Get a list of all strings from all the QR codes in this image.
Get a list of all strings from all the QR codes in this image .
img
RgbImage