pub fn write_binary_ppm(
canvas: &Canvas<Vector3<u8>>,
directory: &Path,
file_name: &str,
) -> Result<(), Box<dyn Error>>Expand description
Writes the image data to the specified path
Takes a directory and file name and writes the image to that directory.
If an image already exist with the specified name, it will be overwritten.
The file path and file name are separate to allow for easier file management.
Example usage:
let my_path = Path::new("./");
let my_canvas = Canvas<Vector3<u8>>::new(500, 500);
write_to_file(&my_canvas, &my_path, "my_image_name");