Closed rwcarlsen closed 11 years ago
Usage example:
...
f, err := os.Open(fname)
if err != nil {
log.Fatal(err)
}
x, err := exif.Decode(f)
if err != nil {
log.Fatal(err)
}
_, err := mknote.Decode(x)
if err != nil {
log.Fatal(err)
}
owner, _ := x.Get(mknote.OwnerName)
...
Except it needs a better name than DecodeFile.
I added a commit to the pull request I started, #11 , to do registration as I described. I'm not completely happy with the several conversions that it takes to add to the list of valid fields, but I suppose it's not too terrible. That could be reworked a bit at some point.
I think the validField check should probably just be removed. If we allow exif package users to load custom fields into the exif structure anyway (LoadDirTags), than anything could be a valid field.
Thanks @gsadams!