Struct libfprint_rs::FpImage
source · pub struct FpImage { /* private fields */ }
Expand description
Struct representing an image of a fingerprint. Not all devices support this feature.
Examples:
use libfprint_rs::FpContext;
use std::fs::File;
use std::io::Write;
let context = FpContext::new();
let devices = context.get_devices();
let device = devices.iter().next().unwrap();
device.open().unwrap();
let image = device.capture_image().unwrap();
let data = image.get_data();
let mut file = File::create("image.pgm").unwrap();
let header = format!("P5\n{} {}\n255\n", image.get_width(), image.get_height());
file.write_all(header.as_bytes()).unwrap();
file.write_all(data.as_slice()).unwrap();
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for FpImage
impl !Send for FpImage
impl !Sync for FpImage
impl Unpin for FpImage
impl UnwindSafe for FpImage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more