Commit b129e1f0 authored by Fefe's avatar Fefe
Browse files

Paramétrage compression

parent 0a5efba1
...@@ -97,7 +97,7 @@ def create_compressed_image(realpath, filename): ...@@ -97,7 +97,7 @@ def create_compressed_image(realpath, filename):
side = int(COMPRESSED_SIZE[1] * original_size[0] / original_size[1]) side = int(COMPRESSED_SIZE[1] * original_size[0] / original_size[1])
image = image.resize((side, COMPRESSED_SIZE[1]), Image.ANTIALIAS) image = image.resize((side, COMPRESSED_SIZE[1]), Image.ANTIALIAS)
image.save(os.path.join(realpath, COMPRESSED_DIRNAME, filename), "JPEG", optimize=True, quality=75) image.save(os.path.join(realpath, COMPRESSED_DIRNAME, filename), "JPEG", optimize=True, quality=COMPRESSION_QUALITY)
except OSError: except OSError:
return return
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment