[][src]Struct rqrr::PreparedImage

pub struct PreparedImage<S> { /* fields omitted */ }

An black-and-white image that can be mutated on search for QR codes

During search for QR codes, some black zones will be recolored in 'different' shades of black. This is done to speed up the search and mitigate the impact of a huge zones.

Implementations

impl<S> PreparedImage<S> where
    S: ImageBuffer, 
[src]

pub fn prepare(buf: S) -> Self[src]

pub fn detect_grids(&mut self) -> Vec<Grid<RefGridImage<'_, S>>>[src]

pub fn without_preparation(buf: S) -> Self[src]

pub fn width(&self) -> usize[src]

Return the width of the image

pub fn height(&self) -> usize[src]

Return the height of the image

pub fn get_pixel_at_point(&self, p: Point) -> PixelColor[src]

pub fn get_pixel_at(&self, x: usize, y: usize) -> PixelColor[src]

pub fn write_state_to(&self, p: &str)[src]

impl PreparedImage<BasicImageBuffer>[src]

pub fn prepare_from_bitmap<F>(w: usize, h: usize, fill: F) -> Self where
    F: FnMut(usize, usize) -> bool
[src]

Given a function with binary output, generate a searchable image

If the given function returns true the matching pixel will be 'black'.

pub fn prepare_from_greyscale<F>(w: usize, h: usize, fill: F) -> Self where
    F: FnMut(usize, usize) -> u8
[src]

Given a byte valued function, generate a searchable image

The values returned by the function are interpreted as luminance. i.e. a value of 0 is black, 255 is white.

Trait Implementations

impl<S> Clone for PreparedImage<S> where
    S: Clone
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for PreparedImage<S> where
    S: RefUnwindSafe

impl<S> Send for PreparedImage<S> where
    S: Send

impl<S> Sync for PreparedImage<S> where
    S: Sync

impl<S> Unpin for PreparedImage<S> where
    S: Unpin

impl<S> UnwindSafe for PreparedImage<S> where
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.