fn pixel_8(
        &self,
        x: i32,
        y: i32,
        ctx: &ColorCtx,
        buf: &[u8],
    ) -> Option<SRgb8> {
        let offset = y * i32::from(self.width) + x;
        let v: u8 = buf[offset as usize];
        if self.transparent_color == Some(v.into()) {
            return None;
        }
        match ctx.rgb(Color::Legacy(v)) {
            Some((red, green, blue)) => Some(SRgb8::new(red, green, blue)),
            None => {
                debug!("pixel_8 -- Bad color {}", v);
                None
            }
        }
    }
/// Get one pixel of an 8-bit (monochrome or classic) color graphic
Get one pixel of an 8-bit (monochrome or classic) color graphic
Get one pixel of an 8 - bit ( monochrome or classic ) color graphic
fn pixel_8(
        &self,
        x: i32,
        y: i32,
        ctx: &ColorCtx,
        buf: &[u8],
    ) -> Option<SRgb8> {
        let offset = y * i32::from(self.width) + x;
        let v: u8 = buf[offset as usize];
        if self.transparent_color == Some(v.into()) {
            return None;
        }
        match ctx.rgb(Color::Legacy(v)) {
            Some((red, green, blue)) => Some(SRgb8::new(red, green, blue)),
            None => {
                debug!("pixel_8 -- Bad color {}", v);
                None
            }
        }
    }
fn pixel_8 ( & self , x : i32 , y : i32 , ctx : & ColorCtx , buf : & [ u8 ] , ) -> Option < SRgb8 > { let offset = y * i32 :: from ( self . width ) + x ; let v : u8 = buf [ offset as usize ] ; if self . transparent_color == Some ( v . into ( ) ) { return None ; } match ctx . rgb ( Color :: Legacy ( v ) ) { Some ( ( red , green , blue ) ) => Some ( SRgb8 :: new ( red , green , blue ) ) , None => { debug ! ( " " v ) ; None } } }
Get one pixel of an 8-bit (monochrome or classic) color graphic
Get one pixel of an 8 - bit ( monochrome or classic ) color graphic
&self
x
i32
y
i32
ctx
&ColorCtx
buf
&[u8]