Struct adder_codec_core::PlaneSize
source · pub struct PlaneSize { /* private fields */ }
Expand description
The size of the image plane in pixels
Implementations§
source§impl PlaneSize
impl PlaneSize
sourcepub fn new(width: u16, height: u16, channels: u8) -> Result<Self, PlaneError>
pub fn new(width: u16, height: u16, channels: u8) -> Result<Self, PlaneError>
Create a new PlaneSize
with the given width, height, and channels
sourcepub fn area_wh(&self) -> usize
pub fn area_wh(&self) -> usize
The total number of 2D pixels in the image plane, across the height and width dimension
sourcepub fn area_wc(&self) -> usize
pub fn area_wc(&self) -> usize
The total number of 2D pixels in the image plane, across the width and channel dimension