SkalskiP commited on
Commit
bca1af7
1 Parent(s): 7e66050

cap image size, ensure result dimension is divisible by 32

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,8 +34,8 @@ def resize_image_dimensions(
34
  new_width = int(width * scaling_factor)
35
  new_height = int(height * scaling_factor)
36
 
37
- new_width = new_width - (new_width % 8)
38
- new_height = new_height - (new_height % 8)
39
 
40
  new_width = min(maximum_dimension, new_width)
41
  new_height = min(maximum_dimension, new_height)
 
34
  new_width = int(width * scaling_factor)
35
  new_height = int(height * scaling_factor)
36
 
37
+ new_width = new_width - (new_width % 32)
38
+ new_height = new_height - (new_height % 32)
39
 
40
  new_width = min(maximum_dimension, new_width)
41
  new_height = min(maximum_dimension, new_height)