File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
com.example.camtestnew/assets
com.example.camtest/assets Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -152,11 +152,11 @@ def build_ui():
152152 "magic" : lv .IMAGE_HEADER_MAGIC ,
153153 "w" : width ,
154154 "h" : height ,
155- "stride" : width ,
156- # "cf": lv.COLOR_FORMAT.RGB565
157- "cf" : lv .COLOR_FORMAT .L8
155+ "stride" : width * 2 ,
156+ "cf" : lv .COLOR_FORMAT .RGB565
157+ # "cf": lv.COLOR_FORMAT.L8
158158 },
159- 'data_size' : width * height ,
159+ 'data_size' : width * height * 2 ,
160160 'data' : None # Will be updated per frame
161161 })
162162 image .set_src (image_dsc )
@@ -176,8 +176,8 @@ def init_cam():
176176 xclk_freq = 20000000 ,
177177 powerdown_pin = - 1 ,
178178 reset_pin = - 1 ,
179- # pixel_format=PixelFormat.RGB565,
180- pixel_format = PixelFormat .GRAYSCALE ,
179+ pixel_format = PixelFormat .RGB565 ,
180+ # pixel_format=PixelFormat.GRAYSCALE,
181181 frame_size = FrameSize .R240X240 ,
182182 grab_mode = GrabMode .LATEST
183183 )
Original file line number Diff line number Diff line change 2626 xclk_freq = 20000000 ,
2727 powerdown_pin = - 1 ,
2828 reset_pin = - 1 ,
29+ #pixel_format=PixelFormat.RAW, # fails
30+ #pixel_format=PixelFormat.RGB888, fails
2931 pixel_format = PixelFormat .RGB565 ,
3032 #pixel_format=PixelFormat.GRAYSCALE,
3133 #pixel_format=PixelFormat.YUV420,
You can’t perform that action at this time.
0 commit comments