pub trait RGBSource {
// Required methods
fn dimensions(&self) -> (usize, usize);
fn pixel_f32(&self, x: usize, y: usize) -> (f32, f32, f32);
// Provided method
fn dimensions_i32(&self) -> (i32, i32) { ... }
}Expand description
Source of arbitrarily formatted RGB data.
This is the “compatible” trait for RGB sources, but it will be slow, since it only supports single pixel lookup.
Required Methods§
Sourcefn dimensions(&self) -> (usize, usize)
fn dimensions(&self) -> (usize, usize)
Returns the underlying image size as an usize tuple (w, h).
Provided Methods§
Sourcefn dimensions_i32(&self) -> (i32, i32)
fn dimensions_i32(&self) -> (i32, i32)
Returns the underlying image size as an i32 tuple (w, h).