pub struct Meta<T: Type, C: Color> {
pub size: Size,
/* private fields */
}
Expand description
Image metadata
Fields§
§size: Size
Image size
Implementations§
source§impl<T: Type, C: Color> Meta<T, C>
impl<T: Type, C: Color> Meta<T, C>
sourcepub fn width_step(&self) -> usize
pub fn width_step(&self) -> usize
Returns the size of a row
sourcepub fn num_pixels(&self) -> usize
pub fn num_pixels(&self) -> usize
Number of pixels
sourcepub fn num_values(&self) -> usize
pub fn num_values(&self) -> usize
Number of items
sourcepub fn is_alpha_channel(&self, c: Channel) -> bool
pub fn is_alpha_channel(&self, c: Channel) -> bool
Returns true when the provided index matches the alpha channel index
sourcepub fn color_name(&self) -> &str
pub fn color_name(&self) -> &str
Get color name
sourcepub fn convert_index_to_point(&self, n: usize) -> Point
pub fn convert_index_to_point(&self, n: usize) -> Point
Convert from index to Point
sourcepub fn iter(&self) -> impl '_ + ParallelIterator<Item = Point>
pub fn iter(&self) -> impl '_ + ParallelIterator<Item = Point>
Get pixel iterator
Trait Implementations§
source§impl<'de, T: Type, C: Color> Deserialize<'de> for Meta<T, C>
impl<'de, T: Type, C: Color> Deserialize<'de> for Meta<T, C>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more