We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4eed7be commit 58b7f9eCopy full SHA for 58b7f9e
browsr/code_browser.py
@@ -158,7 +158,8 @@ def render_document(
158
return self.df_to_table(pandas_dataframe=df, table=self.table_view)
159
elif document.suffix.lower() in [".png", ".jpg", ".jpeg"]:
160
screen_width = self.app.size.width / 4
161
- with Image.open(document) as image:
+ with document.open("rb") as buf:
162
+ image = Image.open(buf)
163
image_width = image.width
164
image_height = image.height
165
size_ratio = image_width / screen_width
0 commit comments