Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set LibRaw dataerror_handler. #76

Closed
wants to merge 1 commit into from

Conversation

ccl
Copy link

@ccl ccl commented Jul 18, 2019

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.

@letmaik
Copy link
Owner

letmaik commented Jul 18, 2019

Thanks! Looks quite useful. To understand better how to use it, can you add a test that triggers an error which then is checked?

@ccl
Copy link
Author

ccl commented Jul 19, 2019

Yes, I can do that. And I should add proper docstrings once I am at it.

@letmaik
Copy link
Owner

letmaik commented Aug 12, 2019

Are you still working on this?

@letmaik letmaik closed this Sep 20, 2019
This was referenced May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants