Closed HamzaFarhan closed 3 years ago
Thank you for reporting this bug:
>>> img.modify_xmp({'Xmp.crs.ToneCurvePV2012': ['0', '0', '255', '255']})
>>> img.read_xmp()
{'Xmp.crs.ToneCurvePV2012': '255'}
I'll try to fix it over the weekend. Either exiv2 doesn't support modifying it, or I made a mistake converting the data type.
I just released v2.6.0. It can write list-type values to these tags.
I'm getting this error now which I was not getting before: OSError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/hamza/anaconda3/envs/dreamai/lib/python3.9/site-packages/pyexiv2/lib/libexiv2.so)
I compiled it using Ubuntu 20.04, whose Glibc version is 2.29. So, if you are a Linux user, you need to update glibc, or upgrade your Linux distribution.
I've upgraded Linux. When can you can v2.6 up and running again?
I have disabled pyexiv2 2.6.0 on pypi.org because it is not compatible with MacOS 11. I'll spend a few days looking at MacOS 11. Until I fix the problem, you can download the 2.6.0 release on GitHub.
It's working fine now. Thank you.
This issue has been automatically closed because there has been no activity for a month.
I'm trying to modify the ToneCurve values of an image.
These are the original: {'Xmp.crs.ToneCurveName2012': 'Linear', 'Xmp.crs.ToneCurvePV2012': ['0', '0', '255', '255'], 'Xmp.crs.ToneCurvePV2012Red': ['0', '0', '255', '255'], 'Xmp.crs.ToneCurvePV2012Green': ['0', '0', '255', '255'], 'Xmp.crs.ToneCurvePV2012Blue': ['0', '0', '255', '255']}
These are the ones I want to set: {'Xmp.crs.ToneCurveName2012': 'Custom', 'Xmp.crs.ToneCurvePV2012': ['0', '11', '32', '25', '67', '74', '114', '131', '176', '181', '252', '230'], 'Xmp.crs.ToneCurvePV2012Red': ['0', '0', '54', '37', '183', '196', '255', '255'], 'Xmp.crs.ToneCurvePV2012Green': ['0', '0', '68', '49', '173', '185', '255', '255'], 'Xmp.crs.ToneCurvePV2012Blue': ['0', '0', '65', '48', '190', '203', '255', '255']}
This is what I end up with after using modify_xmp: {'Xmp.crs.ToneCurveName2012': 'Custom', 'Xmp.crs.ToneCurvePV2012': '230', 'Xmp.crs.ToneCurvePV2012Red': '255', 'Xmp.crs.ToneCurvePV2012Green': '255', 'Xmp.crs.ToneCurvePV2012Blue': '255'}
It seems to only be getting the last value from the modified dict's lists.