Struct rqrr::PreparedImage [−][src]
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]
S: ImageBuffer,
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]
F: FnMut(usize, usize) -> bool,
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]
F: FnMut(usize, usize) -> u8,
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]
S: Clone,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for PreparedImage<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for PreparedImage<S> where
S: Send,
S: Send,
impl<S> Sync for PreparedImage<S> where
S: Sync,
S: Sync,
impl<S> Unpin for PreparedImage<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for PreparedImage<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,