Struct BiLevel
struct BiLevel
A bi-level color map
Examples
use ;
use ;
let = ;
// Create an image with a smooth horizontal gradient from black (0) to white (255).
let gray = from_fn;
// Mapping the gray image through the `BiLevel` filter should map gray pixels less than half
// intensity (127) to black (0), and anything greater to white (255).
let cmap = BiLevel;
let palletized = index_colors;
let mapped = from_fn;
// Create an black and white image of expected output.
let bw = from_fn;
assert_eq!;
Implementations
impl Clone for BiLevel
fn clone(self: &Self) -> BiLevel
impl ColorMap for BiLevel
fn index_of(self: &Self, color: &Luma<u8>) -> usizefn lookup(self: &Self, idx: usize) -> Option<<Self as >::Color>fn has_lookup(self: &Self) -> boolIndicate
NeuQuantimplementslookup.fn map_color(self: &Self, color: &mut Luma<u8>)
impl Copy for BiLevel
impl Freeze for BiLevel
impl RefUnwindSafe for BiLevel
impl Send for BiLevel
impl Sync for BiLevel
impl Unpin for BiLevel
impl UnwindSafe for BiLevel
impl<T> Any for BiLevel
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for BiLevel
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for BiLevel
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for BiLevel
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for BiLevel
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for BiLevel
unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T> ToOwned for BiLevel
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for BiLevel
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for BiLevel
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for BiLevel
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>