Ferdian commited on
Commit
5836e39
·
verified ·
1 Parent(s): d679e85

Update pixelization.py

Browse files
Files changed (1) hide show
  1. pixelization.py +2 -2
pixelization.py CHANGED
@@ -99,8 +99,8 @@ class Model():
99
  in_img = in_img.convert('RGB')
100
 
101
  # limit in_img size to 1024x1024 to maintain performance
102
- # if in_img.size[0] > 1024 or in_img.size[1] > 1024:
103
- # in_img.thumbnail((1024, 1024), Image.NEAREST)
104
 
105
  # Killing inspect element users, I know what you're doing lol.
106
  # pixel_size = pixel_size if pixel_size >= 4 else 4
 
99
  in_img = in_img.convert('RGB')
100
 
101
  # limit in_img size to 1024x1024 to maintain performance
102
+ if in_img.size[0] > 1024 or in_img.size[1] > 1024:
103
+ in_img.thumbnail((1024, 1024), Image.NEAREST)
104
 
105
  # Killing inspect element users, I know what you're doing lol.
106
  # pixel_size = pixel_size if pixel_size >= 4 else 4