Summary: | 32 bit float composite ops overflow: Layer Blending Mode Over Gradients result in strange patterns | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | romuluspb |
Component: | Color models | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dimula73, halla |
Priority: | NOR | ||
Version: | 2.9.7 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/8f4494412e5e791f1426bcc2f9d3dc73ed12d5e2 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Image where pattern can be seen and tested, appears to be an overflow |
Description
romuluspb
2015-09-26 07:25:48 UTC
Created attachment 94722 [details]
Image where pattern can be seen and tested, appears to be an overflow
Yes, it looks like the gradients managed to generate negative colors... Steps to reproduce: 1) Create a RGBAF32 image with g10 color profile 2) Create a gradient Red-Green-Blue 3) Draw this gradient 4) Convert to LabAF32 5) Convert back to RGBAF32 Now some of the pixels have negative values (near zero point). Git commit e488caa31049bfff784f57fa79903df07e02aa1f by Dmitry Kazakov. Committed on 28/08/2020 at 21:14. Pushed by dkazakov into branch 'krita/4.3'. Fix Divide, Vivid Light and Parallel blending modes handle negative layer colors Sometimes, when converting RGBAF32<->LabAF32 colorspaces, LCMS may generate pixels with "slightly negative" values, like -1e-7. The mentioned blending modes couldn't handle that correclty, because they only checked for zero'ness. Now before doing a division operation we: 1) check if the value isn't too small 2) check it the value is positive NOTE: there are still a lot of blendign modes from "Binary" section that still don't handle that correctly. But, speaking truly, I don't think we should actually enable these blending modes for F32 color spaces :) M +23 -0 libs/pigment/KoColorSpaceMaths.h M +11 -11 libs/pigment/compositeops/KoCompositeOpFunctions.h https://invent.kde.org/graphics/krita/commit/e488caa31049bfff784f57fa79903df07e02aa1f Git commit 8f4494412e5e791f1426bcc2f9d3dc73ed12d5e2 by Dmitry Kazakov. Committed on 28/08/2020 at 21:15. Pushed by dkazakov into branch 'master'. Fix Divide, Vivid Light and Parallel blending modes handle negative layer colors Sometimes, when converting RGBAF32<->LabAF32 colorspaces, LCMS may generate pixels with "slightly negative" values, like -1e-7. The mentioned blending modes couldn't handle that correclty, because they only checked for zero'ness. Now before doing a division operation we: 1) check if the value isn't too small 2) check it the value is positive NOTE: there are still a lot of blendign modes from "Binary" section that still don't handle that correctly. But, speaking truly, I don't think we should actually enable these blending modes for F32 color spaces :) M +23 -0 libs/pigment/KoColorSpaceMaths.h M +11 -11 libs/pigment/compositeops/KoCompositeOpFunctions.h https://invent.kde.org/graphics/krita/commit/8f4494412e5e791f1426bcc2f9d3dc73ed12d5e2 |