修正heic图片保存问题
This commit is contained in:
@@ -42,6 +42,8 @@ def split(img_path, ratio=1.414, overlap=0.05, x_compensation=3):
|
||||
wh_ratio = width / height
|
||||
|
||||
img_name, img_ext = common_util.parse_save_path(img_path)
|
||||
if img_ext == 'heic' or img_ext == 'HEIC':
|
||||
img_ext = 'jpg' # cv2无法保存heic图片
|
||||
if hw_ratio > ratio: # 纵向过长
|
||||
new_img_height = width * ratio
|
||||
step = width * (ratio - overlap) # 偏移步长
|
||||
|
||||
Reference in New Issue
Block a user