Zhu-FaceOnLive commited on
Commit
a15da10
Β·
verified Β·
1 Parent(s): a294f5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
8
  count = 0
9
  def image_to_base64(image):
10
  buffered = BytesIO()
11
- image.save(buffered, format="PNG")
12
  return base64.b64encode(buffered.getvalue()).decode('utf-8')
13
 
14
  def base64_to_image(base64_str):
 
8
  count = 0
9
  def image_to_base64(image):
10
  buffered = BytesIO()
11
+ image.save(buffered, format="JPEG", quality=90)
12
  return base64.b64encode(buffered.getvalue()).decode('utf-8')
13
 
14
  def base64_to_image(base64_str):