Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Android-for-Python/c4k_photo_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Camera4Kivy Photo Example

Just Basic Camera Stuff, but you gotta start somewhere.

2023-11-13 This repository is archived.

Overview

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.

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>

About

Basic Camera4Kivy usage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published