Commit 86176fdc authored by Kieran Hymas's avatar Kieran Hymas

Added save screenshot functionality

parent d74a355a
......@@ -210,8 +210,18 @@ class Application:
#Toolbar functions
def onSnapshot(self):
fname = tk.filedialog.asksaveasfilename()
#Deal with no open videostream
if not self.videostreamplaying:
print("[-] Error: no video stream open to screenshot.")
#Take snapshot
ret, frame = self.vid.get_frame(self.options)
if ret:
newframe = cv2.cvtColor(frame,cv2.COLOR_RGB2BGR)
path = tk.filedialog.asksaveasfilename()
cv2.imwrite(path, newframe)
print("[-] Error: something went wrong.")
def onRecord(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment