29 lines
637 B
Python
29 lines
637 B
Python
from PIL import Image
|
|
|
|
|
|
class Overlay(object):
|
|
def __init__(self):
|
|
self.alpha = 0
|
|
|
|
|
|
class PiCamera(object):
|
|
def __init__(self):
|
|
self.resolution = None
|
|
|
|
def start_preview(self, *args, **kwargs):
|
|
pass
|
|
|
|
def add_overlay(self, *args, **kwargs):
|
|
return Overlay()
|
|
|
|
def remove_overlay(self, *args, **kwargs):
|
|
pass
|
|
|
|
def capture(self, filename, format, *args, **kwargs):
|
|
print("FAKE: capture(%s, %s)" % (filename, format))
|
|
img = Image.new("RGB", self.resolution, (255, 255, 255))
|
|
img.save(filename, format)
|
|
|
|
def close(self, *args, **kwargs):
|
|
pass
|