From 70d15e128411712db0ab2b5343050ed08f93e123 Mon Sep 17 00:00:00 2001 From: Casten Riepling Date: Thu, 10 Apr 2025 21:17:23 -0700 Subject: [PATCH] fix incompatibility with ov5640 and Pico Changes to Adafruit_CircuitPython_OV5640 doubled the memory usage for a given quality setting. This makes the latest release of in CircuitPython incompatible with the previous quality setting=3 + colorspace=adafruit_ov5640.OV5640_COLOR_JPEG due to that working out an an allocation size of 204800. This is too much for the first Pico. Here is the breaking change: https://github.com/adafruit/Adafruit_CircuitPython_OV5640/pull/35 Quality 4 is still too large at 153,600 bytes. Quality 5 using 122,880 works. --- PiCowbell_Camera_Demos/JPEG_Capture/code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PiCowbell_Camera_Demos/JPEG_Capture/code.py b/PiCowbell_Camera_Demos/JPEG_Capture/code.py index b660016c9..f36cec121 100644 --- a/PiCowbell_Camera_Demos/JPEG_Capture/code.py +++ b/PiCowbell_Camera_Demos/JPEG_Capture/code.py @@ -76,7 +76,7 @@ def open_next_image(): return open(filename, "wb") cam.colorspace = adafruit_ov5640.OV5640_COLOR_JPEG -cam.quality = 3 +cam.quality = 5 b = bytearray(cam.capture_buffer_size) jpeg = cam.capture(b)