Add image scale option

This commit is contained in:
Joscha 2025-02-22 21:54:54 +01:00
parent f8ff567a00
commit a6d5c9f671
4 changed files with 27 additions and 3 deletions

View file

@ -15,6 +15,7 @@ pub struct ImageDrawing {
pub image: RgbaImage,
pub bright: bool,
pub algo: DitherAlgorithm,
pub scale: u32,
}
impl Drawing for ImageDrawing {
@ -33,6 +34,7 @@ impl Drawing for ImageDrawing {
let image = Image::new(image)
.with_dither_palette(&[BLACK, WHITE])
.with_dither_algorithm(self.algo)
.with_scale(self.scale)
.node()
.register(&mut tree)?;