You've already forked ImageCompressor
mirror of
https://github.com/Llloooggg/ImageCompressor.git
synced 2026-03-06 03:26:23 +03:00
Исправление подсчета тотала изображений
This commit is contained in:
@@ -310,10 +310,9 @@ def compress_image(path: Path):
|
|||||||
if not result:
|
if not result:
|
||||||
result, final_path = compress_with_pillow(path)
|
result, final_path = compress_with_pillow(path)
|
||||||
|
|
||||||
|
if result:
|
||||||
new_size = final_path.stat().st_size
|
new_size = final_path.stat().st_size
|
||||||
total_images_new_size += new_size
|
total_images_new_size += new_size
|
||||||
|
|
||||||
if result:
|
|
||||||
new_hash = file_hash(final_path)
|
new_hash = file_hash(final_path)
|
||||||
saved = original_size - new_size
|
saved = original_size - new_size
|
||||||
percent = (1 - new_size / original_size) * 100
|
percent = (1 - new_size / original_size) * 100
|
||||||
|
|||||||
Reference in New Issue
Block a user