While capture_into_bitmap() exists, it produces a bmp too large for sending over MQTT . This PR factors out the capture into memory buffer code from capture_jpeg() as capture_into_jpeg(), which returns a bytes object if the capture was successful otherwise None (return type must be checked from user-code).
While
capture_into_bitmap()
exists, it produces a bmp too large for sending over MQTT . This PR factors out the capture into memory buffer code fromcapture_jpeg()
ascapture_into_jpeg()
, which returns a bytes object if the capture was successful otherwise None (return type must be checked from user-code).