image

Type Alias GrayImage

Source
pub type GrayImage = ImageBuffer<Luma<u8>, Vec<u8>>;
Expand description

Sendable grayscale image buffer

Aliased Type§

struct GrayImage { /* private fields */ }

Implementations§

Source§

impl GrayImage

Source

pub fn expand_palette( self, palette: &[(u8, u8, u8)], transparent_idx: Option<u8>, ) -> RgbaImage

Expands a color palette by re-using the existing buffer. Assumes 8 bit per pixel. Uses an optionally transparent index to adjust it’s alpha value accordingly.

Trait Implementations§

Source§

impl From<DynamicImage> for GrayImage

Source§

fn from(value: DynamicImage) -> Self

Converts to this type from the input type.