Resize preview

This commit is contained in:
Nicolas Bertrand 2024-11-19 19:29:05 +01:00
parent 80ba6b40e8
commit ef8d988736
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import subprocess
import gphoto2 as gp
import shutil
from . import leds, config
@ -30,6 +31,8 @@ class RealCamera(Camera):
preview = self.inner.file_get(capture.folder, capture.name[:-3] + 'JPG', gp.GP_FILE_TYPE_NORMAL)
raw = self.inner.file_get(capture.folder, capture.name, gp.GP_FILE_TYPE_RAW)
preview.save(output_file + '.jpg')
# Resize preview
subprocess.run(['convert', output_file + '.jpg', '-resize', '10%', output_file + '.jpg'])
raw.save(output_file + '.cr2')