Add quality argument
This commit is contained in:
parent
2399788fdc
commit
2819b504a3
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
import json
|
import json
|
||||||
|
from pickletools import optimize
|
||||||
from weakref import finalize
|
from weakref import finalize
|
||||||
from PIL import Image, ImageOps, ImageFilter
|
from PIL import Image, ImageOps, ImageFilter
|
||||||
import requests
|
import requests
|
||||||
|
@ -104,7 +105,7 @@ def lambda_handler(event, context):
|
||||||
images = event["queryStringParameters"].get("imgs","").split(",")
|
images = event["queryStringParameters"].get("imgs","").split(",")
|
||||||
combined = genImageFromURL(images)
|
combined = genImageFromURL(images)
|
||||||
buffered = BytesIO()
|
buffered = BytesIO()
|
||||||
combined.save(buffered,format="JPEG")
|
combined.save(buffered,format="JPEG",quality=60)
|
||||||
combined_str=base64.b64encode(buffered.getvalue()).decode('ascii')
|
combined_str=base64.b64encode(buffered.getvalue()).decode('ascii')
|
||||||
return {
|
return {
|
||||||
'statusCode': 200,
|
'statusCode': 200,
|
||||||
|
|
Loading…
Reference in a new issue