implement get_image in new camera module

This commit is contained in:
Alexander Minges 2019-02-01 12:52:02 +01:00
parent 7558c6d196
commit c13cb3355e

View file

@ -6,6 +6,7 @@ import subprocess
import signal
from enum import Enum
from PIL import Image
from phytopi import db, models, app
class CameraActionError(Exception):
@ -69,3 +70,8 @@ class CameraWorker(object):
else:
raise CameraActionError('Camera neither idle nor in timelapse mode!')
def get_frame(self, thumbnail=False):
img = Image.open('/dev/shm/mjpeg/cam.jpg')
return img