Closed fgeller closed 9 years ago
@saljam @wathiede Opinions on that change please?
More context, if needed: https://camlistore-review.googlesource.com/#/c/4937/ https://camlistore-review.googlesource.com/#/c/4938/
I'm not very familiar with this codebase, but for what it's worth this looks good to me. IsShortReadTagValueError()
seems to fit with the rest of the exif API.
Looks good. Rebased and merged in 29300d8.
excellent, thanks!
This change is based on a use case from the camlistore project. There we first optimistically pass only a prefix of an image to the decoder hoping that the prefix is sufficient to get metadata out, but would like to pass the entire file in case the decoding fails because the prefix is not sufficient.
The below changes add an error value and helper to identify it that can be used in other projects (like camlistore) to identify a short read without having to match on the error message.
Please let me know what you think :)