mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-14 09:14:45 +03:00
Add inverse mappings for exif tags.
A nicer solution would be to switch to an enum with the right values, but this is the quick win.
This commit is contained in:
parent
1d1a22bde3
commit
6d9d4af192
|
@ -293,6 +293,11 @@ TAGS = {
|
||||||
}
|
}
|
||||||
"""Maps EXIF tags to tag names."""
|
"""Maps EXIF tags to tag names."""
|
||||||
|
|
||||||
|
TAG_CODES = {
|
||||||
|
# possibly incomplete
|
||||||
|
tag_name: tag_code for tag_code, tag_name in TAGS.items()
|
||||||
|
}
|
||||||
|
"""Maps tag names to EXIF tags."""
|
||||||
|
|
||||||
GPSTAGS = {
|
GPSTAGS = {
|
||||||
0: "GPSVersionID",
|
0: "GPSVersionID",
|
||||||
|
@ -329,3 +334,6 @@ GPSTAGS = {
|
||||||
31: "GPSHPositioningError",
|
31: "GPSHPositioningError",
|
||||||
}
|
}
|
||||||
"""Maps EXIF GPS tags to tag names."""
|
"""Maps EXIF GPS tags to tag names."""
|
||||||
|
|
||||||
|
GPS_CODES = {gps_name: gps_code for gps_code, gps_name in GPSTAGS.items()}
|
||||||
|
"""Maps tag names to EXIF GPS tags."""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user