openexr icon indicating copy to clipboard operation
openexr copied to clipboard

Error callback function for RgbaInputFile

Open vmsrc opened this issue 11 months ago • 1 comments

It would be nice if we could override the error callback handler for RgbaInputFile. The default error callback dumps error messages on stderr and that might be undesirable. For most of the InputFile classes it is already possible to set custom error callback by constructing with ContextInitializer, for example: MultiPartInputFile ifile( fileName, ContextInitializer() .silentHeaderParse (true) .strictHeaderValidation (false) .disableChunkReconstruction(false) .setErrorHandler(customExrErrorHandlerCb) ); Such constructor is not implemented for RgbaInputFile, AcesInputFile and possibly other classes.

vmsrc avatar Jan 08 '25 10:01 vmsrc

yes, now that we have replaced the lower level reading functions, the next release of openexr will swap out the writing classes, and then the "other" / secondary classes like rgba input and aces after that. Given we are in a mode of simplifying and modernising, we are making one layer of changes at a time to make sure we are able to quickly react if we break something. If you want to propose a patch to pass through the context to the multipart input file internally, happy to accept that, but otherwise just haven't got to it yet.

kdt3rd avatar Jan 09 '25 10:01 kdt3rd