Create a simple Job

This commit is contained in:
2025-03-19 20:21:45 +01:00
parent b394330405
commit 7a197d9b71
4 changed files with 22 additions and 18 deletions

View File

@@ -7,7 +7,7 @@ use types::Encoding;
#[derive(Clone)]
pub struct TIMInfo {
_path: PathBuf,
path: PathBuf,
image_data: SharedPixelBuffer<Rgba8Pixel>,
palette: Option<PaletteInfo>,
}
@@ -53,7 +53,7 @@ impl TIMInfo {
_ => {return Err(Error::from_str("Only 4 and 8bit color depth are supported for indexed color images"));}
}
}
Ok(TIMInfo{_path: path.clone(), image_data, palette: Some(PaletteInfo::new(palette_colors))})
Ok(TIMInfo{path: path.clone(), image_data, palette: Some(PaletteInfo::new(palette_colors))})
}
else {
@@ -71,7 +71,7 @@ impl TIMInfo {
_ => {return Err(Error::from_str("Only 8bit color depth are supported for direct color images"));}
}
}
Ok(TIMInfo{_path: path.clone(), image_data, palette: None})
Ok(TIMInfo{path: path.clone(), image_data, palette: None})
}
}
@@ -118,6 +118,10 @@ impl TIMInfo {
None
})
}
pub fn get_path(&self) -> std::path::PathBuf {
self.path.clone()
}
}
#[derive(Clone)]