loop = asyncio.get_running_loop()
executor = concurrent.futures.ThreadPoolExecutor()
camera = picamera.PiCamera()
- camera.resolution = (2592, 1944) # Maximal resolution of PiCamera
- camera.framerate = 15 # Maximal framerate at maximal resolution
camera.iso = self._iso
+ camera.resolution = self._full
web_path = os.path.join(self.conf['path'], 'web.jpg')
thumb_path = os.path.join(self.conf['path'], 'thumb.jpg')
try:
functools.partial(
camera.capture, stream, 'jpeg'))
stream.seek(0)
- raw_image = await loop.run_in_executor(
- executor,
- functools.partial(PIL.Image.open, stream))
full_image = await loop.run_in_executor(
executor,
- functools.partial(
- raw_image.resize,
- self._full,
- PIL.Image.ANTIALIAS))
+ functools.partial(PIL.Image.open, stream))
await loop.run_in_executor(
executor,
functools.partial(
web_image = await loop.run_in_executor(
executor,
functools.partial(
- raw_image.resize,
+ full_image.resize,
self._web,
PIL.Image.ANTIALIAS))
await loop.run_in_executor(
thumb_image = await loop.run_in_executor(
executor,
functools.partial(
- raw_image.resize,
+ full_image.resize,
self._thumb,
PIL.Image.ANTIALIAS))
await loop.run_in_executor(