mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 04:23:45 +01:00
decrease image size for faster verification and less token usage
This commit is contained in:
2
main.py
2
main.py
@@ -47,7 +47,7 @@ def register():
|
|||||||
|
|
||||||
return f"Username: {username}\nPassword: {password}"
|
return f"Username: {username}\nPassword: {password}"
|
||||||
|
|
||||||
def resize_image_file(path, max_side=384, fmt="JPEG"):
|
def resize_image_file(path, max_side=256, fmt="JPEG"):
|
||||||
img = Image.open(path)
|
img = Image.open(path)
|
||||||
scale = max_side / max(img.size)
|
scale = max_side / max(img.size)
|
||||||
if scale < 1:
|
if scale < 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user