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:
@@ -90,6 +90,8 @@ def compress_with_external(path: str, ext: str) -> bool:
|
|||||||
str(path),
|
str(path),
|
||||||
],
|
],
|
||||||
check=True,
|
check=True,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
stderr=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
if os.path.getsize(tmp_path) <= target_size:
|
if os.path.getsize(tmp_path) <= target_size:
|
||||||
break
|
break
|
||||||
@@ -109,6 +111,8 @@ def compress_with_external(path: str, ext: str) -> bool:
|
|||||||
str(path),
|
str(path),
|
||||||
],
|
],
|
||||||
check=True,
|
check=True,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
stderr=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
if os.path.getsize(tmp_path) <= target_size or quality < 50:
|
if os.path.getsize(tmp_path) <= target_size or quality < 50:
|
||||||
break
|
break
|
||||||
@@ -135,6 +139,8 @@ def compress_with_external(path: str, ext: str) -> bool:
|
|||||||
"all",
|
"all",
|
||||||
],
|
],
|
||||||
check=True,
|
check=True,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
stderr=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
if os.path.getsize(tmp_path) <= target_size or quality < 50:
|
if os.path.getsize(tmp_path) <= target_size or quality < 50:
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user