IotaCluster commited on
Commit
2bf0206
·
verified ·
1 Parent(s): 7fe2c0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -25,15 +25,15 @@ def take_screenshot(url):
25
 
26
  image = Image.open(BytesIO(screenshot))
27
 
28
- # # Center crop
29
- # width, height = image.size
30
- # crop_size_side = 1100
31
- # crop_size_top = 1000
32
- # left = (width - crop_size_side) // 2
33
- # top = (height - crop_size_top) // 2
34
- # right = left + 1000
35
- # bottom = top + 800
36
- # cropped_image = image.crop((left, top, right, bottom))
37
 
38
  return image
39
 
 
25
 
26
  image = Image.open(BytesIO(screenshot))
27
 
28
+ # Center crop
29
+ width, height = image.size
30
+ crop_size_side = 1280
31
+ crop_size_top = 1280
32
+ left = (width - crop_size_side) // 2
33
+ top = (height - crop_size_top) // 2
34
+ right = left + 1000
35
+ bottom = top + 600
36
+ cropped_image = image.crop((left, top, right, bottom))
37
 
38
  return image
39