Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/openUC2/ImSwitch
Browse files Browse the repository at this point in the history
  • Loading branch information
beniroquai committed Aug 28, 2023
2 parents e13f245 + b1a5109 commit 76de4d4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions imswitch/imcontrol/controller/controllers/RecordingController.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,20 +425,18 @@ def streamer(self):
def video_feeder(self):
return StreamingResponse(self.streamer(), media_type="multipart/x-mixed-replace;boundary=frame")

'''
def snapImage(self, name=None) -> None:
self.snap(name)
'''

@APIExport(runOnUIThread=True)
def snapImageToPath(self, fileName: str = "."):
""" Take a snap and save it to a .tiff file at the given fileName. """
self.snap(name = fileName, mSaveFormat=SaveFormat.TIFF)

@APIExport(runOnUIThread=False)
def snapImage(self, output: bool = False):# -> np.ndarray:
def snapImage(self, output: bool = False) -> Union[None, list]:
""" Take a snap and save it to a .tiff file at the set file path. """
if output:
return self.snapNumpy()
numpy_array = self.snapNumpy()
return numpy_array.tolist() # Convert the numpy array to a list
else:
self.snap()

Expand Down

0 comments on commit 76de4d4

Please sign in to comment.