1 """ Exif tags based on JEITA CP-3451 Exif Version 2.2 specification tables.
6 from os
.path
import join
7 from Globals
import package_home
8 home
= package_home(globals())
32 f
= file(join(home
, name
))
35 for l
in [l
for l
in lines
if not l
.startswith('#')] :
36 fields
= [f
.strip() for f
in l
.split(';')]
37 assert len(fields
) == 7, "%s malformed at line: '%s')" % (path
, l
)
38 tagName
, fieldName
, tagIdDec
, noise
, typ
, count
, noise
= fields
40 if TAGS
.has_key(tagId
) :
41 raise ValueError, "%x tag is already defined" % tagId
42 TAGS
[tagId
] = (fieldName
, tagName
)
43 TAG_TYPES
[tagId
] = (typ
, count
)