Skip to content

Commit

Permalink
Store raw image in a dedicated folder and final image in the folder d…
Browse files Browse the repository at this point in the history
…efined in config (solves #43)
  • Loading branch information
werdeil committed Sep 23, 2018
1 parent bea45b8 commit 546fbae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pibooth/booth.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def entry_actions(self):
self.app.nbr_printed = 0
self.app.previous_picture = None
self.app.previous_picture_file = None
self.app.dirname = osp.join(self.app.savedir, time.strftime("%Y-%m-%d-%H-%M-%S"))
self.app.dirname = osp.join(self.app.savedir, "raw", time.strftime("%Y-%m-%d-%H-%M-%S"))
os.makedirs(self.app.dirname)
self.app.led_preview.switch_on()

Expand Down Expand Up @@ -227,7 +227,7 @@ def entry_actions(self):
self.app.previous_picture = concatenate_pictures(
self.app.camera.get_captures(), footer_texts, bg_color, text_color, orientation)

self.app.previous_picture_file = osp.join(self.app.dirname, time.strftime("%Y-%m-%d-%H-%M-%S") + "_ptb.jpg")
self.app.previous_picture_file = osp.join(self.app.savedir, time.strftime("%Y-%m-%d-%H-%M-%S") + "_ptb.jpg")
with timeit("Save the merged picture in {}".format(self.app.previous_picture_file)):
self.app.previous_picture.save(self.app.previous_picture_file)

Expand Down

0 comments on commit 546fbae

Please sign in to comment.