blanchon commited on
Commit
18010b0
·
verified ·
1 Parent(s): 0123799

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,9 +22,9 @@ def calculate_optimal_dimensions(image: Image.Image):
22
  # Extract the original dimensions
23
  original_width, original_height = image.size
24
 
25
- # Set constants
26
- MIN_ASPECT_RATIO = 9 / 16
27
- MAX_ASPECT_RATIO = 16 / 9
28
  FIXED_DIMENSION = 1024
29
 
30
  # Calculate the aspect ratio of the original image
 
22
  # Extract the original dimensions
23
  original_width, original_height = image.size
24
 
25
+ # Set constants for enforcing a roughly 2:1 aspect ratio
26
+ MIN_ASPECT_RATIO = 1.8
27
+ MAX_ASPECT_RATIO = 2.2
28
  FIXED_DIMENSION = 1024
29
 
30
  # Calculate the aspect ratio of the original image