Fix goalimage scale 2

This commit is contained in:
2024-11-10 01:41:34 +09:00
parent efbce943b6
commit b85b04412a

View File

@ -433,11 +433,11 @@ class SumasenExcel:
cell_aspect = effective_cell_width / effective_cell_height cell_aspect = effective_cell_width / effective_cell_height
if img_aspect > cell_aspect: if img_aspect > cell_aspect:
width = effective_cell_width*scale width = effective_cell_width*int(scale)
height = int(width / img_aspect)*scale height = int(width / img_aspect)*int(scale)
else: else:
height = effective_cell_height*scale height = effective_cell_height*int(scale)
width = int(height * img_aspect)*scale width = int(height * img_aspect)*int(scale)
# 画像処理部分の修正 # 画像処理部分の修正
#from openpyxl.utils.units import pixels_to_EMU #from openpyxl.utils.units import pixels_to_EMU