gPhoto Python bindings added to improve performance. This allows to show now a preview during countdown.

This commit is contained in:
Balthasar Reuter
2016-07-23 15:56:35 +02:00
parent 670f62ac63
commit f2eef6049a
4 changed files with 69 additions and 18 deletions

4
gui.py
View File

@@ -53,7 +53,7 @@ class GUI_PyGame:
def trigger_event(self, event_channel):
EventModule.post(EventModule.Event(pygame.USEREVENT, channel=event_channel))
def show_picture(self, filename, size=(0,0), offset=(0,0)):
def show_picture(self, filename, size=(0,0), offset=(0,0), flip=False):
# Use window size if none given
if size == (0,0):
size = self.size
@@ -74,6 +74,8 @@ class GUI_PyGame:
# Create surface and blit the image to it
surface = pygame.Surface(new_size)
surface.blit(image, (0,0))
if flip:
surface = pygame.transform.flip(surface, True, False)
self.surface_list.append((surface, offset))
def show_message(self, msg, color=(245,245,245), bg=(0,0,0), transparency=True):