- This resulted in the lookup table having unique entries, and therefore
no longer needing its values to be slices. We are going to fix this.
It is not a backwards-compatible change, but this is a fairly internal
internal functionality.
- Add simple accessors to determine if a thumbnail offset or size.
- Invalid tag-type sets the tag-ID so that we can include it in the log.
- Other logging enhancements.
- Removed newline
- Incorporate the thumbnail into the furthest-offset counter.
- Thumbnail() no longer panics ErrNoThumbnail and just returns it.
- This is a managed error, not a true panic condition.
- Collect() now builds index with FQ IFD paths, not non-FQ.
We were not qualifying our thumbnail tag checks with the IFD that
thumbnails are supposed to live in, and were trying to parse the tags
that happen to share the same tag-IDs as thumbnails.
Fixes #dsoprea/go-jpeg-image-structure/issues/10
We now keep track of the further offset that we have accessed (though
not necessarily the furthest offset of data that is unparseable by us).
It sometimes supports debugging efforts to have a ballpark idea of how
much EXIF data there is, rather than just "from the signature to the
end of the file" or however big the EXIF container is in the enclosing
image format. The latter can be buggy or ambiguous.
- Added `SearchAndExtractExifWithReader()`.
- `SearchFileAndExtractExif()` now calls `SearchAndExtractExifWithReader()`
instead of reading the whole image first.
Fixes#34
Relates to optimizations in df264b3 as well.
We've encountered a malformed user-comments value in an image from a
Canon EOS 5D Mark II.
2020/05/02 16:28:58 exifjpeg.ifd: [DEBUG] Parsing IFD [IFD/Exif] (0) at offset (0102).
2020/05/02 16:28:58 exifjpeg.ifd: [DEBUG] Current IFD tag-count: (33)
2020/05/02 16:28:58 main.main: [WARNING] Skipping unparseable undefined tag: [IFD/Exif] (9286)
2020/05/02 16:28:58 exifjpeg.ifd: [DEBUG] Descending to IFD [IFD/Exif/Iop].
2020/05/02 16:28:58 exifjpeg.ifd: [DEBUG] Parsing IFD [IFD/Exif/Iop] (0) at offset (a164).
Fixes#33
It turns out that there is so much loose handling with the terminating
NUL characters out there that there's a societal breakdown without this.
Fixes#31