File tree Expand file tree Collapse file tree 4 files changed +11
-138
lines changed Expand file tree Collapse file tree 4 files changed +11
-138
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22# @Author : LG
33
44__author__ = 'yatengLG'
5- __version__ = '1.2.6 '
5+ __version__ = '1.2.7 '
Original file line number Diff line number Diff line change @@ -1365,14 +1365,18 @@ def about(self):
13651365
13661366 def screen_shot (self , type = 'scene' ):
13671367 # image_name = "ISAT-{}-{}.png".format(type, datetime.datetime.now().strftime("%Y%m%d%H%M%S"))
1368- file_path = os .path .join (self .image_root , self .files_list [self .current_index ])
1369- image_name = os .path .basename (file_path )
1370- image_name = os .path .splitext (image_name )[0 ] + '.png'
1368+ if self .current_index is not None and self .files_list :
1369+ current_image = self .files_list [self .current_index ]
1370+ else :
1371+ current_image = 'no_image.jpg'
1372+ if type == 'scene' :
1373+ print ('no image saved.' )
1374+ return
1375+ image_name = os .path .splitext (current_image )[0 ] + '.png'
13711376 screen_shot_dir = os .path .join (os .getcwd (), 'screen_shots' )
1372- if not os .path .exists (screen_shot_dir ):
1373- os .makedirs (screen_shot_dir , exist_ok = True )
1377+ os .makedirs (screen_shot_dir , exist_ok = True )
13741378 save_path = os .path .join (screen_shot_dir , image_name )
1375- print (f'save path: { file_path } ' )
1379+ print (f'save path: { save_path } ' )
13761380
13771381 if type == 'scene' :
13781382 try :
Original file line number Diff line number Diff line change 11include ISAT/checkpoints/mobile_sam.pt
2- include CHANGELOG.md
32recursive-include ISAT/segment_any *.py
43recursive-include ISAT/widgets *
54recursive-include ISAT/ui *
You can’t perform that action at this time.
0 commit comments