Function create_and_save_image

Source
pub fn create_and_save_image(
    color_data: &[u8],
    output_path: &str,
) -> Result<(), String>
Expand description

Creates an image from color data and saves it to the specified output path.

§Arguments

  • color_data - A slice of bytes representing the color data.
  • output_path - The path where the resulting image will be saved.

§Returns

A Result indicating success or failure. If successful, returns Ok(()). If an error occurs, returns Err with an error message.