Skip to content

Commit

Permalink
resolve default stream processor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
synacktraa committed Jan 11, 2025
1 parent cb71d5a commit 14352c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cillow/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,8 @@ def default_stream_processor(stream: Stream | ByteStream) -> None:
display(Image(data=stream.data))
else:
# Open the image in the default image viewer
patch.prebuilt.pillow_show_switchable.original(stream.data) # type: ignore[arg-type]
from io import BytesIO

from PIL.Image import open as pil_open

patch.prebuilt.pillow_show_switchable.original(pil_open(BytesIO(stream.data)))

0 comments on commit 14352c6

Please sign in to comment.