Skip to content

Python: Define dict conversion for IFD? #145

@kylebarron

Description

@kylebarron

It would be nicer to have an easier way to see what's in an IFD in Python.

Right now, every tag is a separate attribute, so you have to manually check all the attributes of an IFD to see what tags even exist. It should be possible to dump the IFD tag values into a dict.

If we think this makes sense, then we should be able to implement __iter__ and __getitem__ dunder methods on the IFD, which implements the Python "mapping protocol", which means dict(ifd) would work out of the box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions