Skip to content

Commit

Permalink
save directory is now in user home directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
panditsomnath10016git committed Dec 30, 2022
1 parent 862d575 commit b06717e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions simple_picameraGUI.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import os
from time import sleep, strftime
from tkinter import END, Canvas, Entry, Label, Tk
from tkinter.ttk import Button, Frame, Style
from time import strftime, sleep

from picamera import PiCamera

homedir = os.path.expanduser("~")


class App(Tk):
def __init__(self, **kw) -> None:
Expand All @@ -14,13 +18,15 @@ def __init__(self, **kw) -> None:
theme.theme_use("clam")
# self.geometry("800x480+300+250")
self.minsize(410, 300)
self.title("Move square")
self.title("sPiCameraGUI")

self.resolution = (1280, 720)
self.framerate = 30
self.camera = PiCamera(resolution=self.resolution, framerate=self.framerate)

self.save_dir = "./capture/"
self.save_dir = os.path.join(homedir, "PiCamCapture", "")
if not os.path.exists(self.save_dir):
os.makedirs(self.save_dir)
self.image_format = "jpeg"

self.create_frames()
Expand Down

0 comments on commit b06717e

Please sign in to comment.