Closed ghost closed 4 years ago
Good idea!
The low-level mechanism for this already exists in the gexiv2-sys
wrapper, in the form of the various gexiv2_log_*
functions: https://github.com/felixc/gexiv2-sys/blob/11e04f4cf073de591e99c65cee1896b99a928962/src/lib.rs#L205-L211
It should be possible to build something like what you're looking for on top of these. I don't have an API in mind right now, though; so I'm very open to ideas here!
Fixed in https://github.com/felixc/rexiv2/commit/1fadb5f37d248cec2640f20a33ac5a8bb208d62c which landed https://github.com/felixc/rexiv2/pull/37 — thank you @t1ra for this improvement!
Currently, rexiv2 prints warnings as they are printed from gexiv2. For example, parsing this corrupted image with code like this:
prints:
If possible, there should be a way to silence these warnings, or maybe have them returned as an error in a
Result
.