Created attachment 114393 [details] color-to-alpha range on gradient and black background Please take a look at attached screen. Left is original white to black gradient. Center right is gradient with Color to Alpha set to black and range 255. Right is Color to Alpha set to white and range only 100. I'm not sure about this, but center example should be perfect black and right one with some white gradient visible. Kra file attached. Nightly build git: 9d313ac
Created attachment 114394 [details] color-to-alpha sample kra file
Application Version: MASTER Needs More Info (And Feedback) Perhaps I'm misunderstanding this feature, but it seems to me to be working as intended. Lets talk about the left most filter first. You have black set to 255 which eats away most (but not all of) the white. I think this makes some degree of sense due to the limitation of the the bar itself, and not the logic. Perhaps it could be argued that the value should go from 0 > 257 for a full range (where 0 would keep ALL data and 257 would remove all data) but I don't believe that technically means it is a bug -- but I could be wrong and would like to see others input on this. Now for the second example, this seems to be working fine with the caveat that the brightness on screen does not necessarily equate to brightness of values in actuality. If you set the value to something like 80, you get more what you are expecting (a little bit of white sandwiched between two blacks.) I could be wrong about some of this though.
Created attachment 114994 [details] color-to-alpha sample kra file updated I've updated file to cover full range and left some white and black bar visible. I've also added reversed gradient from white to black (not from transparent to white as previous one) just in case. I think bug is this 100 value, that's limiting effect for black and is "enough" for white. If you pick grey that you get from left sample you will get exact 100, like effect is limited to only 100. Reversed situation is visible on right gradient: if you use only 100 value you remove all of white (logic tells me you should put 255 to get all of white removed). Question here now: why you can remove all of white with only 100 value set and only get grey value of 100 trying to remove all of black (0 value)? Why you can't remove all of white and get black? For me it's like scale of slider is set in values 0-255 and effect is in percent 0-100 or something like this.
Application Version: Master CONFIRMED Yes, there's definitely some inconsistency in behavior here that needs to be addressed. That second file cleared things up for me, so thanks.
Hi, Alex! There are several points I should make clear before making any real decision about the bug: 1) The 'threshold' value in this filter is not directly linked to RGB values. It is actually CIELAB deltaE (CIE76) value, normalized to a 0...255 range. So I would not try to make any assumptions on its numerical values. Just 0 removes nothing, 100 removes the selected color only, 255 is the value that removes almost everything. The values in between are just interpolation of this behavior :) 2) In the second version of your file, there is a bug, 'Filter Mask 2' of 'Copy of Layer 1' removes black color instead of white. Therefore it gives inconsistent behavior with the other mask. If you change the color of 'Filter Mask 2' to white then they start behave quite consistently. 3) I don't actually understand what the problem is? Do you mean that value 255 doesn't hide everything? https://en.wikipedia.org/wiki/Color_difference#CIE76
Created attachment 115034 [details] Test file for removing black and white Here is a test file that tries to remove black and white from a gradiant. As far as I can tell, the filter works quite logically in both cases.
Created attachment 115035 [details] color-to-alpha sample kra file on black and white background @Dmitry: Thank you! I wasn't aware that 100 removes color only and it also seems like my testing methodology has flaw: I need to test against black and white background not only black. Indeed I thought that 255 is removing actual color. I'm here very, very sorry for my beta-tester inconvenience! Two things noticed in the meantime (second not related): - removing white with thr. 100 on white background will not give exact same result as source gradient, this is minor difference though (visible on upper gradient and a little bit on lower in blacks range) - invert filter seems not to give same result on gradient, I'm not sure if it should (hidden invert test filter layer) but checked in PS and "inverted" gradient is ok there
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
I've provided all info I could. I can provide more but I need suggestions from Dev.
Thanks for your comment! Automatically switching the status of this bug to REPORTED so that the KDE team knows that the bug is ready to get confirmed. In the future you may also do this yourself when providing needed information.
We should give emmet bugzilla prowess. Setting this to confirmed.
Hi, Alex! I'm sorry for a very long delay with the bug. But I still cannot see, what the problem is? If you set both masks' (black and white) to 68. they recover the original gradient completely. Though speaking truly, I'm not sure that this filter is designed to do precise maths, because the result of deltaE (CIE76) is calculated in linear gamma space, but blending happens in sRGB with gamma ~2.2. We might try to think about a bit more intuitive values for it, but then we will have to change the difference calculation algorithm itself. Could you specify what exactly was the usecase you tried to solve with the filter? Perhaps we could think about a better difference calculation algorithm then.
Created attachment 131084 [details] Alpha mask test I used this filter to add fog/aerial perspective using z-buffer image generated from renderer, however I need to prepare file to show results. I've checked attached file with new Krita Next build. When both filter masks are set to about 100 it looks like it works fine: white mask removes all whites and black mask removes all blacks. I'm not sure what result I was getting before but as far as I can tell this issue can now be closed. However indeed some better accuracy and possibility that 255 setting would remove color completely would be nice.
Thanks @Alex!