pub, clone
This commit is contained in:
parent
4dd334d6a4
commit
c962748797
|
@ -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<u8> = Vec::new();
|
||||
|
||||
for pixel in self.pixels {
|
||||
|
|
Loading…
Reference in New Issue