File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -737,8 +737,9 @@ def capture_jpeg(
737737 logging .info ("Reconfiguring camera for full resolution capture" )
738738 cam .configure (cam .create_still_configuration ())
739739 cam .start ()
740+ cam .options ["quality" ] = 95
740741 logging .info ("capturing" )
741- cam .capture_file (path , name = "main" , format = "jpeg" )
742+ cam .capture_file (path , name = "main" , format = "jpeg" , wait = 5 )
742743 logging .info ("done" )
743744 # After the file is written, add metadata about the current Things
744745 exif_dict = piexif .load (path )
@@ -773,6 +774,15 @@ def grab_jpeg(
773774 )
774775 return JPEGBlob .from_bytes (frame )
775776
777+ @thing_action
778+ def capture_highres_array (
779+ self ,
780+ ):
781+ with self .picamera (pause_stream = True ) as picam2 :
782+ capture_config = picam2 .create_still_configuration ()
783+ array = picam2 .switch_mode_and_capture_array (capture_config )
784+ return array
785+
776786 @thing_action
777787 def grab_jpeg_size (
778788 self ,
You can’t perform that action at this time.
0 commit comments