From f5bbb83f621129c5b9703013c006b6173528acdf Mon Sep 17 00:00:00 2001 From: Luthics Date: Thu, 12 Jan 2023 20:31:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=97=A7w/h=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 4266727..6a5a5a5 100644 --- a/main.py +++ b/main.py @@ -294,16 +294,16 @@ for currentRow in tqdm(range(new_height), "计算新像素点中"): newimgArray = [66, 77] if (angle in [0, 180]): - rowLength = floor(width * bpp / 8) + rowLength = floor(new_width * bpp / 8) while (rowLength % 4 != 0 or rowLength == 0): rowLength += 1 new_fileSize = 54 + rowLength * new_height #文件头中的文件大小 new_imageSize = rowLength * new_height else: - rowLength = floor(height * bpp / 8) + rowLength = floor(new_height * bpp / 8) while (rowLength % 4 != 0 or rowLength == 0): rowLength += 1 - new_fileSize = 54 + rowLength * new_height #文件头中的文件大小 + new_fileSize = 54 + rowLength * new_width #文件头中的文件大小 new_imageSize = rowLength * new_width # 新文件头