Trait fastfreeimage::FastImage
source · pub trait FastImage {
type D: 'static + Copy;
type C: ChanTrait;
// Required methods
fn image_slice(&self) -> &[Self::D];
fn raw_ptr(&self) -> *const Self::D;
fn stride(&self) -> c_int;
fn size(&self) -> &FastImageSize;
// Provided methods
fn width(&self) -> c_int { ... }
fn height(&self) -> c_int { ... }
fn valid_row_iter(
&self,
size: &FastImageSize
) -> Result<ValidChunksExact<'_, Self::D>> { ... }
fn pixel_slice(&self, row: usize, col: usize) -> &[Self::D] { ... }
}
Required Associated Types§
Required Methods§
sourcefn image_slice(&self) -> &[Self::D]
fn image_slice(&self) -> &[Self::D]
Get the raw data for the entire image, including padding.
fn raw_ptr(&self) -> *const Self::D
sourcefn size(&self) -> &FastImageSize
fn size(&self) -> &FastImageSize
Get the image size in number of pixels.
Provided Methods§
sourcefn valid_row_iter(
&self,
size: &FastImageSize
) -> Result<ValidChunksExact<'_, Self::D>>
fn valid_row_iter( &self, size: &FastImageSize ) -> Result<ValidChunksExact<'_, Self::D>>
Iterate over elements in each image row. Returns valid slices.
sourcefn pixel_slice(&self, row: usize, col: usize) -> &[Self::D]
fn pixel_slice(&self, row: usize, col: usize) -> &[Self::D]
Get the raw data for a pixel.