2
I need to edit the information exif
of an image, such as location and date, for example, but I’m not able to find any library that does this with Python 3.4 and Windows. The most I got was using Pillow to read these properties, however, when I edit and try to save the image as follows:
image.save(path+'/teste.jpg', 'JPEG', exif=tags)
Where tags
is a Dict, it says that the parameter Exif does not accept the type Dict, even because it is a binary. I recover Exif as follows:
tags = image._getexif()
If I try to save directly with this Exif, it will point out the same error, only if I use:
tags = image.info['exif']
I can use tags to save, however it comes in a format that is impossible to edit. So, is there any lib for Windows and Python 3 that solves this problem?
I think the Exifread may work in this case.
– stderr
@qmechanik, the problem is that I can only read Exif, I can’t edit. ://
– Felipe Avelar
I suggest you take a look at gexiv2 (possesses bindings for Python, 2 and 3). I have never used, I can’t evaluate if it is good or not. Fountain :)
– mgibsonbr
@mgibsonbr, I took a look at it, but from what I understand, it’s only for Unix based. : // The closest one so far has been pyexiv2 (which is a deprecated version of gexiv2), because it’s a function for Windows, but only python 2.x :/
– Felipe Avelar