Closed ccl closed 5 years ago
Thanks! Looks quite useful. To understand better how to use it, can you add a test that triggers an error which then is checked?
Yes, I can do that. And I should add proper docstrings once I am at it.
Are you still working on this?
I ran into the situation where I needed to read a bunch of raw images for analysis in Python. With the help of RawPy, that is usually a piece of cake. It turned out that a couple of the files could not be read, resulting in LibRaw reporting a data corruption to stderr. However, that is the only way that the error is detectable. There are no exceptions, no error codes as return values, and the
raw_image
is still accessible, albeit corrupted.LibRaw allows to set a callback function for handling such errors, and this pull request exposes corresponding methods to Python.