fix pil_to_bytes quality
This commit is contained in:
parent
fbb278298b
commit
276676625d
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ build
|
||||
!lama_cleaner/app/build
|
||||
dist/
|
||||
lama_cleaner.egg-info/
|
||||
venv/
|
||||
|
@ -87,7 +87,7 @@ def numpy_to_bytes(image_numpy: np.ndarray, ext: str) -> bytes:
|
||||
|
||||
def pil_to_bytes(pil_img, ext: str, exif=None) -> bytes:
|
||||
with io.BytesIO() as output:
|
||||
pil_img.save(output, format=ext, exif=exif)
|
||||
pil_img.save(output, format=ext, exif=exif, quality=95)
|
||||
image_bytes = output.getvalue()
|
||||
return image_bytes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user