This code is showing a choosen picture for approx. 5 seconds until it crashed. What's wrong?
import sys
import photos
from scene import *
class Test(Scene):
def draw(self):
image(load_pil_image(img), 10, 10, 800, 600)
pics = photos.get_count()
if (pics == 0):
print 'Sorry no access or no pictures.'
sys.exit()
img = photos.pick_image()
if not image:
print 'No picture was selected. Good bye!'
sys.exit()
run(Test())