Attempt to hold onto absolute position of a Directory relative to the original file/stream #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the long way around to try and address Issue #35. It introduces a "JpegSegment" object to pass around instead of a byte[] for segments. The object contains the byte[] previously sent, plus a starting position from when the segment was read relative to original file.
In one sense, it would have been easier to correct the thumbnail offset directly in ExifTiffHandler.Completed. However, as I was going through this it seemed like there might be use down the road for the original offset. One thing lead to another and a bunch of files were changed. This kind of demonstrates how complex it is to send this around the current readers/handlers, so I'll leave it up to you whether it's a "good" thing. It does fix the thumbnail issue, but at a cost. That said, it's a totally optional property and isn't used anywhere else. Also, not all file types were tested so this might be incomplete.