diff --git a/src/image.rs b/src/image.rs index 3850c3d..234063f 100644 --- a/src/image.rs +++ b/src/image.rs @@ -4,7 +4,7 @@ use std::fs::read_to_string; use image::{DynamicImage, ImageBuffer}; use crate::Palette; -#[derive(Debug, Eq, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] pub struct Image { pub name: String, /// colour indices - todo convert to [u8; 64]? @@ -24,7 +24,7 @@ impl Image { Self { name, pixels } } - fn into_image(self, palette: &Palette) -> DynamicImage { + pub fn into_image(self, palette: &Palette) -> DynamicImage { let mut buffer: Vec = Vec::new(); for pixel in self.pixels {