LeoHsiao1 / pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
GNU General Public License v3.0
196 stars 39 forks source link

Support conversion #129

Closed frafra closed 6 months ago

frafra commented 7 months ago

It would be nice to have these functions exposed: https://exiv2.org/doc/convert_8hpp.html.

LeoHsiao1 commented 7 months ago

Hi! I haven't used this feature in exiv2, I'll try it this week.

I'm going to add four functions:

convert_exif_to_xmp(data:dict) -> dict
convert_iptc_to_xmp(data:dict) -> dict
convert_xmp_to_exif(data:dict) -> dict
convert_xmp_to_iptc(data:dict) -> dict

Expected results:

>>> import pyexiv2
>>> pyexiv2.convert_exif_to_xmp({'Exif...': '...'})
{'Xmp...': '...'}
LeoHsiao1 commented 6 months ago

I just released v2.11.0