We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf74659 commit 72b299bCopy full SHA for 72b299b
display/image.py
@@ -45,9 +45,14 @@ def process_bitmap(image_path):
45
width, height = image.size
46
47
image = image.convert("RGB")
48
+
49
+ # Flip the image 90 degrees (270 degrees counterclockwise) if width is less than height
50
+ if width < height:
51
+ image = image.transpose(Image.ROTATE_270)
52
53
image = image.transpose(Image.FLIP_TOP_BOTTOM) # Mirror the image horizontally
54
#flip the image 90 degrees
- image = image.transpose(Image.ROTATE_270)
55
+ #image = image.transpose(Image.ROTATE_270)
56
pixel_data = convert_to_565(image)
57
save_as_c_header(os.path.basename(image_path), pixel_data, width, height)
58
print(f"Processed {image_path} and saved as C header.")
0 commit comments