Skip to content

Commit 5aaf38a

Browse files
committed
fix possible resolutions
1 parent 2c4889a commit 5aaf38a

File tree

1 file changed

+34
-32
lines changed

1 file changed

+34
-32
lines changed

adafruit_pycamera.py

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -31,51 +31,53 @@
3131

3232
class PyCamera:
3333
resolutions = (
34-
"160x120",
35-
"176x144",
36-
"240x176",
34+
#"160x120",
35+
#"176x144",
36+
#"240x176",
3737
"240x240",
3838
"320x240",
39-
"400x296",
40-
"480x320",
39+
#"400x296",
40+
#"480x320",
4141
"640x480",
42-
"720x1280",
4342
"800x600",
44-
"864x1536",
4543
"1024x768",
46-
"1080x1920",
47-
"1280x1024",
4844
"1280x720",
45+
"1280x1024",
4946
"1600x1200",
5047
"1920x1080",
48+
#"720x1280",
49+
#"864x1536",
5150
"2048x1536",
5251
"2560x1440",
5352
"2560x1600",
53+
#"1080x1920",
5454
"2560x1920",
5555
)
56-
resolution_to_frame_size = [
57-
espcamera.FrameSize.QQVGA,
58-
espcamera.FrameSize.QCIF,
59-
espcamera.FrameSize.HQVGA,
60-
espcamera.FrameSize.R240X240,
61-
espcamera.FrameSize.QVGA,
62-
espcamera.FrameSize.CIF,
63-
espcamera.FrameSize.HVGA,
64-
espcamera.FrameSize.VGA,
65-
espcamera.FrameSize.SVGA,
66-
espcamera.FrameSize.XGA,
67-
espcamera.FrameSize.HD,
68-
espcamera.FrameSize.SXGA,
69-
espcamera.FrameSize.UXGA,
70-
espcamera.FrameSize.FHD,
71-
espcamera.FrameSize.P_HD,
72-
espcamera.FrameSize.P_3MP,
73-
espcamera.FrameSize.QXGA,
74-
espcamera.FrameSize.QHD,
75-
espcamera.FrameSize.WQXGA,
76-
espcamera.FrameSize.P_FHD,
77-
espcamera.FrameSize.QSXGA,
78-
]
56+
resolution_to_frame_size = (
57+
#espcamera.FrameSize.QQVGA,
58+
#espcamera.FrameSize.QCIF,
59+
#espcamera.FrameSize.HQVGA,
60+
espcamera.FrameSize.R240X240, # 240x240
61+
espcamera.FrameSize.QVGA, # 320x240
62+
#espcamera.FrameSize.CIF, # 400x296
63+
#espcamera.FrameSize.HVGA, # 480x320
64+
espcamera.FrameSize.VGA, # 640x480
65+
espcamera.FrameSize.SVGA, # 800x600
66+
espcamera.FrameSize.XGA, # 1024x768
67+
espcamera.FrameSize.HD, # 1280x720
68+
espcamera.FrameSize.SXGA, # 1280x1024
69+
espcamera.FrameSize.UXGA, # 1600x1200
70+
espcamera.FrameSize.FHD, # 1920x1080
71+
#espcamera.FrameSize.P_HD, # 720x1280
72+
# espcamera.FrameSize.P_3MP, # 864x1536
73+
espcamera.FrameSize.QXGA, # 2048x1536
74+
espcamera.FrameSize.QHD, # 2560x1440
75+
espcamera.FrameSize.WQXGA, # 2560x1600
76+
#espcamera.FrameSize.P_FHD, # 1080x1920
77+
espcamera.FrameSize.QSXGA, # 2560x1920
78+
)
79+
combined_list = list(zip(resolutions, resolution_to_frame_size))
80+
print(combined_list)
7981

8082
effects = ("Normal", "Invert", "B&W", "Reddish", "Greenish", "Bluish", "Sepia", "Solarize")
8183
modes = ("JPEG", "GIF", "STOP")

0 commit comments

Comments
 (0)