Add cat to sheep.qoi and render it

This commit is contained in:
Sofia 2025-09-12 20:34:10 +03:00
parent 98c1bf0840
commit 5c88cf9086
3 changed files with 6 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@ -62,7 +62,7 @@ macro_rules! non_bss_statics {(
// static ref SHEEP: [u8] = *include_bytes!("../images/sheep.qoi");
// // static ref LARGE: [u8] = *include_bytes!("../images/large.qoi");
// }
static SHEEP: [u8; 446] = *include_bytes!("../images/sheep.qoi");
static SHEEP: [u8; 1077] = *include_bytes!("../images/sheep.qoi");
// const LARGE_C1: [u8; 512] = LARGE.as_chunks().0[0];
// const LARGE_C2: [u8; 512] = LARGE.as_chunks().0[1];
@ -127,11 +127,13 @@ pub fn draw_image<T: DelayNs, DCPin: PinOps, RSTPin: PinOps>(
ufmt::uwriteln!(serial, "Successfully read QOI header").unwrap();
let scale_factor = 10;
display.set_window(
position,
Position {
x: position.x + 191,
y: position.y + 191,
x: position.x + (width * scale_factor) - 1,
y: position.y + (width * scale_factor) - 1,
},
);
@ -139,7 +141,7 @@ pub fn draw_image<T: DelayNs, DCPin: PinOps, RSTPin: PinOps>(
let scale_iter = ScaleIterator {
qoi: qoi_iter,
last_row: [Rgb565::yellow(); 64],
scale_factor: 3,
scale_factor: scale_factor as usize,
width: width as usize,
counter: 0,
index: 0,