removed wron flip
This commit is contained in:
parent
21a7e0cede
commit
ec296b76db
@ -38,7 +38,6 @@ class Fotobox:
|
|||||||
|
|
||||||
camera.preview_configuration.main.size = res
|
camera.preview_configuration.main.size = res
|
||||||
camera.preview_configuration.main.format = 'BGR888'
|
camera.preview_configuration.main.format = 'BGR888'
|
||||||
camera.preview_configuration.transform = Transform(hflip=1, vflip=1)
|
|
||||||
camera.configure("preview")
|
camera.configure("preview")
|
||||||
|
|
||||||
self._capture_config = camera.create_still_configuration()
|
self._capture_config = camera.create_still_configuration()
|
||||||
@ -265,3 +264,9 @@ class Fotobox:
|
|||||||
upload.parent.mkdir(parents=True, exist_ok=True)
|
upload.parent.mkdir(parents=True, exist_ok=True)
|
||||||
os.link(path, upload)
|
os.link(path, upload)
|
||||||
print("Photo saved: %s" % path.absolute())
|
print("Photo saved: %s" % path.absolute())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
Photo.py
4
Photo.py
@ -1,7 +1,7 @@
|
|||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from Event import Event, shrink_inside
|
from Event import Event, shrink_inside
|
||||||
from config import THUMB_WIDTH, pil_image_to_surface, SCREEN_RECT, BORDER, now, generate_code, HTTPS, DOMAIN, PHOTO_HEIGHT
|
from config import THUMB_WIDTH, pil_image_to_surface, SCREEN_RECT, BORDER, now, generate_code, HTTPS, DOMAIN, PHOTO_HEIGHT, WIDTH
|
||||||
|
|
||||||
|
|
||||||
class Photo:
|
class Photo:
|
||||||
@ -29,7 +29,7 @@ class Photo:
|
|||||||
self.thumb_rect = self.thumb_surface.get_rect(centery=SCREEN_RECT.centery, left=(self.number - 1) * (THUMB_WIDTH + BORDER) + BORDER)
|
self.thumb_rect = self.thumb_surface.get_rect(centery=SCREEN_RECT.centery, left=(self.number - 1) * (THUMB_WIDTH + BORDER) + BORDER)
|
||||||
|
|
||||||
self.chosen_surface = pil_image_to_surface(shrink_inside(self.framed_image, THUMB_WIDTH, PHOTO_HEIGHT))
|
self.chosen_surface = pil_image_to_surface(shrink_inside(self.framed_image, THUMB_WIDTH, PHOTO_HEIGHT))
|
||||||
self.chosen_rect = self.thumb_surface.get_rect(centery=SCREEN_RECT.centery, left=(self.number - 1) * (THUMB_WIDTH + BORDER) + BORDER)
|
self.chosen_rect = self.chosen_surface.get_rect(right=WIDTH - 2 * BORDER, centery=SCREEN_RECT.centery)
|
||||||
|
|
||||||
def _resize(self, width: float):
|
def _resize(self, width: float):
|
||||||
height = width / self.photo_image.width * self.photo_image.height
|
height = width / self.photo_image.width * self.photo_image.height
|
||||||
|
|||||||
@ -8,7 +8,7 @@ from pygame import Surface
|
|||||||
from pygame.time import Clock
|
from pygame.time import Clock
|
||||||
from qrcode.main import QRCode
|
from qrcode.main import QRCode
|
||||||
|
|
||||||
DEBUG: bool = True
|
DEBUG: bool = False
|
||||||
|
|
||||||
WIDTH: int = 800
|
WIDTH: int = 800
|
||||||
HEIGHT: int = 480
|
HEIGHT: int = 480
|
||||||
|
|||||||
5
rsync.sh
Normal file → Executable file
5
rsync.sh
Normal file → Executable file
@ -2,4 +2,7 @@
|
|||||||
|
|
||||||
cd "$(dirname "$0")/data/photos/upload" || exit 1
|
cd "$(dirname "$0")/data/photos/upload" || exit 1
|
||||||
|
|
||||||
rsync -a ./* fotobox@mc.ph87.de:/srv/fotobox.online/html/p/
|
while true; do
|
||||||
|
rsync -a -e 'ssh -p 2222' ./* mc@mc.ph87.de:/srv/fotobox.online/html/p/
|
||||||
|
sleep 60
|
||||||
|
done
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user