diff --git a/controllers/main.py b/controllers/main.py index 33616b0..315e2a0 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -45,9 +45,9 @@ class SignController(Sign): # Decode image_bytes = base64.b64decode(image_data) - # Process image: limit size to max 1920x1920 and reasonable quality + # Process image: limit size to max 1080x1080 and reasonable quality # image_process returns the processed image binary - processed_image = image_process(image_bytes, size=(1920, 1920), quality=80, output_format='JPEG') + processed_image = image_process(image_bytes, size=(1080, 1080), quality=80, output_format='JPEG') # Re-encode new_base64 = base64.b64encode(processed_image).decode('utf-8') diff --git a/static/src/js/sign_image_upload.js b/static/src/js/sign_image_upload.js index d5b46b6..6e6532c 100755 --- a/static/src/js/sign_image_upload.js +++ b/static/src/js/sign_image_upload.js @@ -57,8 +57,8 @@ patch(SignablePDFIframe.prototype, { let width = img.width; let height = img.height; - // Calculate new dimensions (e.g., max width/height 1920 to keep it reasonable) - const MAX_SIZE = 1920; + // Calculate new dimensions (e.g., max width/height 1080 to keep it reasonable) + const MAX_SIZE = 1080; if (width > height) { if (width > MAX_SIZE) { height *= MAX_SIZE / width;