Skip to content

Commit

Permalink
Update imagesize.py issuse: shibukawa#57
Browse files Browse the repository at this point in the history
add BufferedReader support
  • Loading branch information
fuyb1992 authored Oct 11, 2024
1 parent 8d88ec6 commit 3a6b008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imagesize/imagesize.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get(filepath):
height = -1
width = -1

if isinstance(filepath, io.BytesIO): # file-like object
if isinstance(filepath, (io.BytesIO, io.BufferedReader)): # file-like object
fhandle = filepath
else:
fhandle = open(filepath, 'rb')
Expand Down

0 comments on commit 3a6b008

Please sign in to comment.