LeoHsiao1 / pyexiv2

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

Request: Add ImageMetadata function #141

Closed Jozko568 closed 1 month ago

Jozko568 commented 1 month ago

Hello,

I have seen that some people get confused when trying to call the ImageMetadata function which is available from py3exiv2 instead of your pyexiv2 The py3exiv2 project is no longer active and it is terrible experience to get it build on Windows. Is it possible to introduce the same function in your library? It would save us hours of troubleshooting :)

Reference: https://github.com/LeoHsiao1/pyexiv2/issues/97 https://github.com/LeoHsiao1/pyexiv2/issues/86 https://github.com/LeoHsiao1/pyexiv2/issues/30

LeoHsiao1 commented 1 month ago

Hi! In 2019, I tried to call exiv2 in python. I didn't know that py3exiv2 existed (otherwise I would have used it), so I created the pyexiv2 project. I designed a few functions in pyexiv2 to be as simple as possible, unlike exiv2. If I add another API like ImageMetadata, it will take a lot of time to maintain.

Truely, some users get confused between py3exiv2 and pyexiv2. I want to save their time. How about adding a simple warning in pyexiv2?

def ImageMetadata(*args, **kwargs):
    raise NameError('ImageMetadata() is the API of the py3exiv2 project, see https://pypi.org/project/py3exiv2 . However, you are using the pyexiv2 project, see https://pypi.org/project/pyexiv2 .')
Jozko568 commented 1 month ago

I understand that maintaining additional APIs can be time-consuming, but if you were to add the API, your library would be "one stop shop" for most of the features with simple setup on both Windows and Linux (where the old py3exiv2 definitely isn't) It would be greatly appreciated if you could add this API to your library. This would be the real time saver for users.

LeoHsiao1 commented 1 month ago

In py3exiv2, ImageMetadata is a class containing dozens of methods. https://python3-exiv2.readthedocs.io/en/latest/index.html The usage and style of these APIs is different from pyexiv2. If pyexiv2 is not compatible with all of py3exiv2's APIs, users will need to spend a lot of time to understand why those APIs are different from py3exiv2. A better approach would be to remind the user that pyexiv2 is different from py3exiv2.

Jozko568 commented 1 month ago

Okay, understand. It it's too different from your library, adding the warning might be enough. Thanks.

LeoHsiao1 commented 1 month ago

I just released v2.14.0 , hope that helps!

Jozko568 commented 1 month ago

Thanks!