read_ppm

Function read_ppm 

Source
pub fn read_ppm(
    directory: &Path,
    file_name: &str,
) -> Result<Canvas<Vector3<u8>>, Box<dyn Error>>
Expand description

This function reads from a .ppm file at the specified path and outputs a Canvas<Vector3<u8>> object containing its data.

Example usage:

let new_canvas: Canvas<Vector3<u8>> = read_to_canvas(Path::new("./my_image.ppm"));