Spaces:
Sleeping
Sleeping
Update pixelization.py
Browse files- 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 |
-
|
103 |
-
|
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
|