Skip to main content

PixelSource

Trait PixelSource 

Source
pub trait PixelSource {
    // Required methods
    fn source_width(&self) -> u32;
    fn source_height(&self) -> u32;
    fn source_format(&self) -> &PixelFormat;
    fn source_claims(&self) -> SampleClaims;
    fn source_hdr(&self) -> HdrMetadata;
    fn source_row(&self, y: u32) -> &[u8] ⓘ;

    // Provided methods
    fn source_origin(&self) -> Option<&ColorOrigin> { ... }
    fn source_orientation(&self) -> Orientation { ... }
}
Expand description

Full re-export of zenpixels core types (zero module name collisions!). Uniform read interface across PixelView, PixelBuf, and BandedBuf.

Required Methods§

Source

fn source_width(&self) -> u32

Frame width in pixels.

Source

fn source_height(&self) -> u32

Frame height in rows.

Source

fn source_format(&self) -> &PixelFormat

Authoritative image specification.

Source

fn source_claims(&self) -> SampleClaims

Attached sample claims.

Source

fn source_hdr(&self) -> HdrMetadata

Descriptive HDR metadata.

Source

fn source_row(&self, y: u32) -> &[u8] ⓘ

Active bytes of row y.

Provided Methods§

Source

fn source_origin(&self) -> Option<&ColorOrigin>

Original container color provenance, if attached.

Source

fn source_orientation(&self) -> Orientation

Pending EXIF display orientation (defaults to Orientation::Identity).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§