mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-03-15 14:09:36 +00:00
fix other conditions as well
This commit is contained in:
parent
297757778d
commit
b947b5a4a3
@ -277,6 +277,7 @@ class PromptServer():
|
|||||||
if os.path.isfile(file):
|
if os.path.isfile(file):
|
||||||
if 'preview' in request.rel_url.query:
|
if 'preview' in request.rel_url.query:
|
||||||
with Image.open(file) as img:
|
with Image.open(file) as img:
|
||||||
|
img = ImageOps.exif_transpose(img)
|
||||||
preview_info = request.rel_url.query['preview'].split(';')
|
preview_info = request.rel_url.query['preview'].split(';')
|
||||||
image_format = preview_info[0]
|
image_format = preview_info[0]
|
||||||
if image_format not in ['webp', 'jpeg'] or 'a' in request.rel_url.query.get('channel', ''):
|
if image_format not in ['webp', 'jpeg'] or 'a' in request.rel_url.query.get('channel', ''):
|
||||||
@ -318,6 +319,7 @@ class PromptServer():
|
|||||||
|
|
||||||
elif channel == 'a':
|
elif channel == 'a':
|
||||||
with Image.open(file) as img:
|
with Image.open(file) as img:
|
||||||
|
img = ImageOps.exif_transpose(img)
|
||||||
if img.mode == "RGBA":
|
if img.mode == "RGBA":
|
||||||
_, _, _, a = img.split()
|
_, _, _, a = img.split()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user