Loading EXR files with multiple layers with colorspaces different from the document colorspace crashes. This doesn't fix all the issues in opening that sample exr file, but at least it will load the layers with the correct colorspaces.
Details
Details
Diff Detail
Diff Detail
- Repository
- R37 Krita
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
Definitely a good thing and should be pushed, but for this particular bug, I now get an infinite loop in
/** * Division by a tiny alpha may result in an overflow of half * value. That is why we use safe iterational approach. */ while (1) { dstPixel.setUnmultiplied(srcPixel.pixel, newAlpha); if (dstPixel.checkUnmultipliedColorsConsistent(srcPixel.pixel)) { break; } newAlpha += alphaEpsilon<channel_type>(); alphaWasModified = true; }
Comment Actions
Found the fix for the loop. There is a check used by the unmultiplyAlpha function that checks the alpha values. Unfortunately, it's only written to consider positive alpha values. I don't know if there are any other checks for alpha or color values like this that assumes the values are > 0, but they didn't come up anywhere else in the sample file in the bug ticket.