mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-22 14:03:06 +03:00
Update docs/handbook/tutorial.rst
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
52ac725ae0
commit
21351c8982
|
@ -417,7 +417,7 @@ This example uses PIL together with pathlib, in order to reduce the quality of a
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
def compressImg(filepath, verbose=False):
|
def compressImg(filepath):
|
||||||
file = filepath.stem
|
file = filepath.stem
|
||||||
with Image.open(filepath) as img:
|
with Image.open(filepath) as img:
|
||||||
if img.mode != 'RGB':
|
if img.mode != 'RGB':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user