Open gorgonaut04 opened 8 years ago
In case somebody else stumbles onto this. This works:
from photolibrary import PhotosLibrary
def on_image_captured(photoslibrary):
print("Image was successfully captured", photoslibrary)
def on_capture_cancelled(photoslibrary):
print('Cancelled!', photoslibrary)
photos = PhotosLibrary()
if photos.isCameraAvailable:
photos.capture_image(filename)
photos.bind(
on_image_captured=on_image_captured,
on_capture_cancelled=on_capture_cancelled
)
else:
photos.chooseFromGallery(filename)
I will soon be testing your implementation, but I was wondering if the Readme could be corrected (not sure which parts are incorrect; "photos" not declared, "pyPhotoLibrary" not declared anywhere in the repository):