Moustikitos / tyf

Manipulate EXIF and IFD metadata.
19 stars 8 forks source link

Use enum for the types ? #9

Closed u1735067 closed 7 years ago

u1735067 commented 7 years ago

I may have missed the explanation about this, but I wanted to understand the format used in tags.py and I had to find what is the second field, then try to see where those values are used. I figured out it's Type after following code. Maybe a comment could be added to explain the format ? Also I think the type specification system used, ie. list of integers, is hard to follow and should be written as enum if possible ?

Just my feedback from trying to understand how it works, but it might makes other/future maintainers life easier.

u1735067 commented 7 years ago

Ok, I just completly missed https://github.com/Moustikitos/tyf/blob/master/Tyf/__init__.py#L14, nevermind :x

Moustikitos commented 7 years ago

Hello,

I use integer list according to tiff spec, the data type is written in ifd entry as short in second position [type, type, count, offset_or_value].

ifd.py module definesTiffTag object that implements "tag behaviour"

thanks for using my lib.