fudii0921 commited on
Commit
1c37d2b
·
verified ·
1 Parent(s): b2b22cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,12 +15,12 @@ def capture_image(image,username,userid, format):
15
  filename = userid + ".png"
16
  new_width, new_height = 354, 472
17
  resized_image = cv2.resize(image_array, (new_width, new_height), interpolation=cv2.INTER_LINEAR)
18
- cv2.imwrite(filename, image_array, [int(cv2.IMWRITE_PNG_COMPRESSION), 9])
19
  else:
20
  filename = userid + ".jpg"
21
  new_width, new_height = 354, 472
22
  resized_image = cv2.resize(image_array, (new_width, new_height), interpolation=cv2.INTER_LINEAR)
23
- cv2.imwrite(filename, image_array, [int(cv2.IMWRITE_JPEG_QUALITY), 90])
24
 
25
 
26
  # base64 encode
 
15
  filename = userid + ".png"
16
  new_width, new_height = 354, 472
17
  resized_image = cv2.resize(image_array, (new_width, new_height), interpolation=cv2.INTER_LINEAR)
18
+ cv2.imwrite(filename, resized_image, [int(cv2.IMWRITE_PNG_COMPRESSION), 9])
19
  else:
20
  filename = userid + ".jpg"
21
  new_width, new_height = 354, 472
22
  resized_image = cv2.resize(image_array, (new_width, new_height), interpolation=cv2.INTER_LINEAR)
23
+ cv2.imwrite(filename, resized_image, [int(cv2.IMWRITE_JPEG_QUALITY), 90])
24
 
25
 
26
  # base64 encode