finish
This commit is contained in:
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -684,9 +684,9 @@ def generate_image(prompt, progress_callback=None, retry_count=0, max_retries=2)
|
||||
b5 = (b >> 3) & 0x1F
|
||||
|
||||
# Pack as Big Endian (>H) which is standard for SPI displays
|
||||
# BGR565: Blue(5) Green(6) Red(5)
|
||||
bgr565 = (b5 << 11) | (g6 << 5) | r5
|
||||
rgb565_data.extend(struct.pack('>H', bgr565))
|
||||
# RGB565: Red(5) Green(6) Blue(5)
|
||||
rgb565 = (r5 << 11) | (g6 << 5) | b5
|
||||
rgb565_data.extend(struct.pack('>H', rgb565))
|
||||
|
||||
# 保存为.bin文件
|
||||
with open(GENERATED_THUMB_FILE, 'wb') as f:
|
||||
|
||||
Reference in New Issue
Block a user