Skip to main content

MatView

Trait MatView 

Source
pub trait MatView {
    // Required methods
    fn width(&self) -> u32;
    fn height(&self) -> u32;
    fn channels(&self) -> u32;
    fn pixel_format(&self) -> PixelFormat;
    fn data(&self) -> &[u8] ;
}
Expand description

Read-only view over an image buffer with pixel-format metadata.

Required Methods§

Source

fn width(&self) -> u32

Width in pixels.

Source

fn height(&self) -> u32

Height in pixels.

Source

fn channels(&self) -> u32

Number of channels per pixel.

Source

fn pixel_format(&self) -> PixelFormat

The pixel format describing the interleaved byte layout.

Source

fn data(&self) -> &[u8]

The raw pixel bytes in row-major interleaved order.

Implementors§