Raspberry Pi Ltd has switched totally to libcamera stack for their CSI cameras with new python library (picamera2) since 2020, and now it is the default on Raspberry Pi OS. picamera2 also works on 64-bit OS while deprecated picamera library (using legacy camera interface) doesn't.
This PR adds support for new picamera2 with PiCamera2. It also fixes and improves old PiCamera to allow setting camera parameters such as width, height, fps and rotation (to use in non-standard ways of arrangement).
Raspberry Pi Ltd has switched totally to libcamera stack for their CSI cameras with new python library (picamera2) since 2020, and now it is the default on Raspberry Pi OS. picamera2 also works on 64-bit OS while deprecated picamera library (using legacy camera interface) doesn't. This PR adds support for new picamera2 with PiCamera2. It also fixes and improves old PiCamera to allow setting camera parameters such as width, height, fps and rotation (to use in non-standard ways of arrangement).