Just Basic Camera Stuff, but you gotta start somewhere.
2023-11-13 This repository is archived.
Four screens showing camera orientation, aspect ratio, and image capture. On mobile devices, rotate the device to see different layouts. On the desktop change the window size to change the window from landscape to portrait to simulate rotating a mobile device.
Available on most of the usual platforms.
The example demonstrates Preview Widget layout: orientation, aspect ratio, and letterbox handling. Also switching between cameras, image capture, and screenshot capture. On Android only it demonstrates video with audio capture, pinch/spread zoom, and tap focus/exposure.
This example depends on Camera4Kivy. Read about Camera4Kivy because, depending on the platform you may need to install a camera provider.
pip3 install camera4kivy
Camera4Kivy depends on Buildozer 1.3.0 or later
requirements = python3,kivy,camera4kivy,gestures4kivy
android.permissions = CAMERA, RECORD_AUDIO
p4a.hook = camerax_provider/gradle_options.py
The example includes a camera provider and a buildozer.spec.
toolchain pip3 install camera4kivy
Permission to use the camera and save images is required by iOS. To enable permissions edit <project>-ios/<project-Info.plist
. These two entries must be added:
To enable use of the Camera add:
<key>NSCameraUsageDescription</key>
<string> </string>
To enable saving image captures to the Photos App (the default behavior) add:
<key>NSPhotoLibraryAddUsageDescription</key>
<string> </string>