注释增加
This commit is contained in:
parent
271b30e24f
commit
a2bd7237fa
6
main.py
6
main.py
|
@ -286,6 +286,7 @@ for currentRow in tqdm(range(new_height), "计算新像素点中"):
|
|||
newpixels[currentRow].append(pixels[ori_row][ori_col])
|
||||
|
||||
################## 缩放图片 End ##################
|
||||
################## 字节计算 Start ##################
|
||||
|
||||
# 处理新文件
|
||||
newimgArray = [66, 77]
|
||||
|
@ -415,6 +416,9 @@ for i in tqdm(range(len(newpixels)), "将像素点格式化中"):
|
|||
newimgArray.extend(pixel)
|
||||
newimgArray.extend(sizeByte(0, rowLength - len(row) * (new_bpp // 8)))
|
||||
|
||||
################## 字节计算 END ##################
|
||||
################## 写出文件 Start ##################
|
||||
|
||||
# 写入新的文件
|
||||
newimgBytes = bytes(newimgArray)
|
||||
|
||||
|
@ -422,3 +426,5 @@ with open(output_file, 'wb') as f:
|
|||
f.write(newimgBytes)
|
||||
for _ in tqdm(range(len(newimgBytes)), "写出图片中"):
|
||||
pass
|
||||
|
||||
################## 写出文件 End ##################
|
Loading…
Reference in New Issue