Struct image::Luma[][src]

#[repr(C)]
pub struct Luma<T: Primitive> { pub data: [T; 1], }

Grayscale colors

Fields

Trait Implementations

impl<T: PartialEq + Primitive> PartialEq for Luma<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq + Primitive> Eq for Luma<T>
[src]

impl<T: Clone + Primitive> Clone for Luma<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug + Primitive> Debug for Luma<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Copy + Primitive> Copy for Luma<T>
[src]

impl<T: Hash + Primitive> Hash for Luma<T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Primitive + 'static> Pixel for Luma<T>
[src]

The underlying subpixel type.

Returns the number of channels of this pixel type.

Returns a string that can help to interpret the meaning each channel See gimp babl. Read more

Returns the ColorType for this pixel format

Returns the components as a slice.

Returns the components as a mutable slice

Returns the channels of this pixel as a 4 tuple. If the pixel has less than 4 channels the remainder is filled with the maximum value Read more

Construct a pixel from the 4 channels a, b, c and d. If the pixel does not contain 4 channels the extra are ignored. Read more

Returns a view into a slice. Read more

Returns mutable view into a mutable slice. Read more

Convert this pixel to RGB

Convert this pixel to RGB with an alpha channel

Convert this pixel to luma

Convert this pixel to luma with an alpha channel

Apply the function f to each channel of this pixel.

Apply the function f to each channel of this pixel.

Apply the function f to each channel except the alpha channel. Apply the function g to the alpha channel. Read more

Apply the function f to each channel except the alpha channel. Apply the function g to the alpha channel. Works in-place. Read more

Apply the function f to each channel of this pixel and other pairwise. Read more

Apply the function f to each channel of this pixel and other pairwise. Works in-place. Read more

Invert this pixel

Blend the color of a given pixel into ourself, taking into account alpha channels

impl<T: Primitive> Index<usize> for Luma<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T: Primitive> IndexMut<usize> for Luma<T>
[src]

Performs the mutable indexing (container[index]) operation.

Auto Trait Implementations

impl<T> Send for Luma<T> where
    T: Send

impl<T> Sync for Luma<T> where
    T: Sync