Skip to content

Latest commit

 

History

History
53 lines (32 loc) · 1.95 KB

README.md

File metadata and controls

53 lines (32 loc) · 1.95 KB

Camera4Kivy Photo Example

Just Basic Camera Stuff, but you gotta start somewhere.

Overview

Four screens showing camera orientation, aspect ratio, and image capture. On Android orientation = all is available, 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.

Install

This example depends on Camera4Kivy. Read about Camera4Kivy because, depending on the platform you may need to install a camera provider.

Windows, MacOS, Linux

pip3 install camera4kivy

Android

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.

iOS

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>