Copying and Writing EXIF information from one image to another
Am trying to copy EXIF information of a Image file to the resized version of the same image using pyexiv2. I created a function like this:
def get_exif(file):
"""
Retrieves EXIF information from a image
"""
ret = {}
metadata = pyexiv2.
metadata.read()
info = metadata.exif_keys
for key in info:
data = metadata[key]
ret[key] = data.raw_value
return ret
def write_exif(
"""
This function would write an exif information of an image file to another image file
"""
exifInformation = get_exif(
metadata = pyexiv2.
for key, value in exifInformation
copyrightName = kwargs.
if copyrightName != None:
try:
except:
return False
else:
return True
But this ends up in an error
Python argument types in
_ExifTag.
did not match C++ signature:
_setParentI
Request Method: POST
Request URL: http://
Django Version: 1.3.1
Exception Type: ArgumentError
Exception Value:
Python argument types in
_ExifTag.
did not match C++ signature:
_setParentI
Exception Location: /usr/lib64/
Python Executable: /usr/bin/python2.7
Python Version: 2.7.2
**Traceback**
/usr/local/
/usr/local/
/home/swaroop/
/home/swaroop/
/usr/lib64/
return getattr(self, '_set_%s_tag' % family)(key, tag_or_value) ...
/usr/lib64/
/usr/lib64/
Please help me to understand what went wrong. Thanks
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- pyexiv2 Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Olivier Tilloy
- Solved:
- Last query:
- Last reply: