[−][src]Struct ffimage::color::bgr::Bgr
BGR pixel
Implementations
impl<T: StorageType> Bgr<T>
[src]
pub fn new(channels: [T; 3]) -> Self
[src]
Returns a new pixel
Arguments
channels
- Channel values
Example
use std::array; use std::convert::{From, TryFrom}; use std::ops::{Index, IndexMut}; use ffimage::{create_pixel, define_pixel, impl_Pixel}; use ffimage::core::{Pixel, StorageType}; // define a new pixel type create_pixel!(Rgb, 3, #[doc = "RGB pixel"]); // use the newly created type let pix = Rgb::<u8>::new([0, 0, 0]);
Trait Implementations
impl<T: Clone + StorageType> Clone for Bgr<T>
[src]
impl<T: Copy + StorageType> Copy for Bgr<T>
[src]
impl<T: Debug + StorageType> Debug for Bgr<T>
[src]
impl<T: Default + StorageType> Default for Bgr<T>
[src]
impl<T: Eq + StorageType> Eq for Bgr<T>
[src]
impl<I: StorageType + AsPrimitive<f32>, O: StorageType + FromPrimitive> From<Bgr<I>> for Gray<O>
[src]
impl<I: StorageType + AsPrimitive<O>, O: StorageType + 'static> From<Bgr<I>> for Rgb<O>
[src]
impl<I: StorageType + AsPrimitive<O>, O: StorageType + Bounded + 'static> From<Bgr<I>> for Rgba<O>
[src]
impl<I: StorageType + AsPrimitive<O>, O: StorageType + Bounded + 'static> From<Bgr<I>> for Bgra<O>
[src]
impl<I: StorageType + AsPrimitive<O>, O: StorageType + 'static> From<Bgra<I>> for Bgr<O>
[src]
impl<I: StorageType + AsPrimitive<O>, O: StorageType + 'static> From<Gray<I>> for Bgr<O>
[src]
impl<I: StorageType + AsPrimitive<O>, O: StorageType + 'static> From<Rgb<I>> for Bgr<O>
[src]
impl<I: StorageType + AsPrimitive<O>, O: StorageType + 'static> From<Rgba<I>> for Bgr<O>
[src]
impl<T: StorageType> Index<usize> for Bgr<T>
[src]
impl<T: StorageType> IndexMut<usize> for Bgr<T>
[src]
impl<T: PartialEq + StorageType> PartialEq<Bgr<T>> for Bgr<T>
[src]
impl<T: StorageType> Pixel for Bgr<T>
[src]
type T = T
Type of the container elements
fn at(&self, index: usize) -> Self::T
[src]
fn try_from(raw: &[Self::T]) -> Result<Self, TryFromSliceError>
[src]
fn channels() -> u8
[src]
fn subpixels() -> u8
[src]
fn len() -> usize
[src]
impl<T: StorageType> StructuralEq for Bgr<T>
[src]
impl<T: StorageType> StructuralPartialEq for Bgr<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Bgr<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Bgr<T>
impl<T> Sync for Bgr<T>
impl<T> Unpin for Bgr<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Bgr<T> where
T: UnwindSafe,
T: 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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<SP, DP> TryConvertSlice<DP> for SP where
DP: Pixel + From<SP>,
SP: Pixel,
[src]
DP: Pixel + From<SP>,
SP: Pixel,
type Error = ()
fn try_convert(
&[SP],
&mut [DP]
) -> Result<(), <SP as TryConvertSlice<DP>>::Error>
[src]
&[SP],
&mut [DP]
) -> Result<(), <SP as TryConvertSlice<DP>>::Error>
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.
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>,