Struct image::Rgb [] [src]

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

RGB colors

Fields

Trait Implementations

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

[src]

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

[src]

This method tests for !=.

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

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Formats the value using the given formatter.

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

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

[src]

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

1.3.0
[src]

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

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

The underlying subpixel type.

[src]

Returns the number of channels of this pixel type.

[src]

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

[src]

Returns the ColorType for this pixel format

[src]

Returns the components as a slice.

[src]

Returns the components as a mutable slice

[src]

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

[src]

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

[src]

Returns a view into a slice. Read more

[src]

Returns mutable view into a mutable slice. Read more

[src]

Convert this pixel to RGB

[src]

Convert this pixel to RGB with an alpha channel

[src]

Convert this pixel to luma

[src]

Convert this pixel to luma with an alpha channel

[src]

Apply the function f to each channel of this pixel.

[src]

Apply the function f to each channel of this pixel.

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Invert this pixel

[src]

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

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

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

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

[src]

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