Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read from BytesIO image? #33

Open
apiszcz opened this issue Aug 14, 2021 · 1 comment
Open

Read from BytesIO image? #33

apiszcz opened this issue Aug 14, 2021 · 1 comment

Comments

@apiszcz
Copy link

apiszcz commented Aug 14, 2021

Is it possible to retrieve exiftools metadata from a BytesIO object? I am trying the following, with error below.

img = Image.open('bus.jpg')
buf = io.BytesIO()
img.save(buf, 'jpeg')
imgbytes = buf.getvalue()
exif = exiftool.ExifTool.get_metadata(imgbytes)
pprint.pprint(exif)
 testexif.py
Traceback (most recent call last):
  File "C:\test\testexif.py", line 8, in <module>
    exif = exiftool.ExifTool.get_metadata(imgbytes)
TypeError: get_metadata() missing 1 required positional argument: 'filename'
@sylikc
Copy link

sylikc commented Jan 30, 2022

I don't think we can pipe data to exiftool because we're already using it for commands https://exiftool.org/forum/index.php?topic=3098.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants