Double AA
Double AA

Reputation: 5969

Getting exif data from an image online with python

Hi Is there a way to read exif data from a online image given its url without downloading the image? Right now I'm doing something like:

import urllib, pyexiv2
urllib.urlretrieve(url, File)
exif_info = pyexiv2.ImageMetadata(File)
exif_info.read()
print exif_info.exif_keys

but I'd like to do it without the download step and read directly from the internet. Is that possible?

Edit: Just to be clear the url I'm referring to is something like http://www.site.com/logo.jpg

Upvotes: 1

Views: 831

Answers (2)

Diego Queiroz
Diego Queiroz

Reputation: 3411

Actually, the statement "read directly from the internet" is called download.

If you were able to download only some part of the file, it would be possible. But I don't think it's possible, specially because you can't determine where the EXIF DATA is in the file.

Upvotes: 3

boatcoder
boatcoder

Reputation: 18107

Unless the website exposes that metadata, there is no way to "read" it until you have read the image.

Upvotes: 1

Related Questions