diff --git a/Images/scooby-doo.bin b/Images/scooby-doo.bin new file mode 100644 index 0000000..5e3c6af Binary files /dev/null and b/Images/scooby-doo.bin differ diff --git a/Images/tomb-raider.bin b/Images/tomb-raider.bin new file mode 100644 index 0000000..b8d4b76 Binary files /dev/null and b/Images/tomb-raider.bin differ diff --git a/convert_image.py b/convert_image.py new file mode 100644 index 0000000..ea08a16 --- /dev/null +++ b/convert_image.py @@ -0,0 +1,23 @@ +from PIL import Image + +def generate_bitmap(input_path, output_path): + # 1. Resize to 90x90 + img = Image.open(input_path).convert('1').resize((90, 90)) + width, height = img.size + + # Calculate bytes per row (90 pixels needs 12 bytes) + bytes_per_row = (width + 7) // 8 + bitmap = bytearray(bytes_per_row * height) # 1080 bytes total + + for y in range(height): + for x in range(width): + if img.getpixel((x, y)) == 0: # 0 is black + byte_idx = y * bytes_per_row + (x // 8) + bit_idx = 7 - (x % 8) + bitmap[byte_idx] |= (1 << bit_idx) + + with open(output_path, "wb") as f: + f.write(bitmap) + print(f"Created {output_path} with size: {len(bitmap)} bytes") + +generate_bitmap("logo.png", "./data/logo.bin") diff --git a/data/logo.bin b/data/logo.bin index 5e3c6af..b8d4b76 100644 Binary files a/data/logo.bin and b/data/logo.bin differ