返回提交历史
Modified
g4f/image/__init__.py
+1
-7
XFEstudio/gpt4free
Update process generate thumbnails
cc5d0e9c
代码差异
1 个文件
+1
-7
@@ -243,14 +243,8 @@ def process_image(image: Image, new_width: int = 800, new_height: int = 800, sav
243
243
orientation = get_orientation(image)
244
244
if orientation:
245
245
debug.log(f"Image orientation: {orientation}")
246
if orientation > 4:
247
image = image.transpose(FLIP_LEFT_RIGHT)
248
if orientation in [3, 4]:
246
if orientation == 6:
249
247
image = image.transpose(ROTATE_180)
250
if orientation in [5, 6]:
251
image = image.transpose(ROTATE_270)
252
if orientation in [7, 8]:
253
image = image.transpose(ROTATE_90)
254
248
# Resize image
255
249
image.thumbnail((new_width, new_height))
256
250
# Remove transparency