XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Update process generate thumbnails

cc5d0e9c
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +1 -7
Modified g4f/image/__init__.py +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