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 2
2
# @Author : LG
3
3
4
4
__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):
1365
1365
1366
1366
def screen_shot (self , type = 'scene' ):
1367
1367
# 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'
1371
1376
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 )
1374
1378
save_path = os .path .join (screen_shot_dir , image_name )
1375
- print (f'save path: { file_path } ' )
1379
+ print (f'save path: { save_path } ' )
1376
1380
1377
1381
if type == 'scene' :
1378
1382
try :
Original file line number Diff line number Diff line change 1
1
include ISAT/checkpoints/mobile_sam.pt
2
- include CHANGELOG.md
3
2
recursive-include ISAT/segment_any *.py
4
3
recursive-include ISAT/widgets *
5
4
recursive-include ISAT/ui *
You can’t perform that action at this time.
0 commit comments