NewIfdMappingWithStandard and related (in ifd.go). We now use the same
functions in common/.
- NewIfdMappingWithStandard now returns an error, too.
This took care of several backwards-incompatible tasks that have been
waiting on v3 to be forked.
Given a stream of data, it is possible to determine the beginning of
EXIF data but not the end. Therefore, either an image-aware
implementation must know how to parse an image and extract the EXIF
data or a brute-force search implementation (one of which is provided
by this project) must find the start anchor and then return all bytes
from that to the end of the file.
We have been made aware of some use-cases where a brute-force search
might be unavoidable due to trust or stability issues with the image
structure. This leads to large allocations. This can be avoided by
accomodating support that will allow for both a byte-slice or an
`io.ReadSeeker`. Since the EXIF structure is typically not read-
intensive (a couple of kilobytes if no thumbnail is present), this
should have a minimal performance impact.
Closes#42
Tip of dependency is broken and it was affecting us:
https://github.com/go-errors/errors/issues/27
- We also disabled 1.10 and 1.11 due to lack of support in dependencies now that we're being recognized as a module.
if `Decode()` returns `exifcommon.ErrUnhandledUndefinedTypedTag` it just
falls through, but should have been returning
`exifundefined.ErrUnparseableValue`.
- Also, `GetRawBytes()` was missing the recover clause for blanket error
handler.
In lieu of dropping in next release. We needed this in order to write
some unit-tests for exifcommon functionality, and this is common
functionality anyway (by any definition of common thus far).
- common/ifd.go: Added NewIfdIdentityFromString. The above allowed us to
cover this with unit-tests.
- This was required for go-exif-knife, to get IFD-paths from the
command-line.
- utility.go: Add GetExifData() to return flat tags and extra data and
to allow guessing of tags for misplaced IFDs.
- exif-read-tool/main.go: Implement tag guessing
2020/05/25 19:21:33 exif.utility: [WARNING] Tag with ID (0x0201) in IFD [IFD/Exif] is not recognized and will be ignored.
2020/05/25 19:21:33 exif.utility: [WARNING] (cont'd) Tag [JPEGInterchangeFormat] with the same ID has been found in IFD [IFD] and may be related. The tag you were looking for might have been written to the wrong IFD by a buggy implementation.
2020/05/25 19:21:33 exif.utility: [WARNING] Tag with ID (0x0202) in IFD [IFD/Exif] is not recognized and will be ignored.
2020/05/25 19:21:33 exif.utility: [WARNING] (cont'd) Tag [JPEGInterchangeFormatLength] with the same ID has been found in IFD [IFD] and may be related. The tag you were looking for might have been written to the wrong IFD by a buggy implementation.
Closes#38