pub struct Pixels {
pub img_path: PathBuf,
}Expand description
Holds a path to an image and a method to convert it into an ugly thumbnail.
Fields§
§img_path: PathBufImplementations§
source§impl Pixels
impl Pixels
sourcepub fn resized_rgb8(
&self,
width: u32,
height: u32
) -> FmResult<ImageBuffer<Rgb<u8>, Vec<u8>>>
pub fn resized_rgb8(
&self,
width: u32,
height: u32
) -> FmResult<ImageBuffer<Rgb<u8>, Vec<u8>>>
Tries to scale down the image to be displayed in the terminal canvas. Fastest algorithm is used (nearest neighbor) since the result is always ugly nonetheless. It may be fun to show to non geek users :)