oblivioncth Posted September 17, 2020 Share Posted September 17, 2020 (edited) I've begun studying it by seeing how many up-ticks of tolerance it takes for the next pixel to be affected in a gradient (of hue, sat, light, or combinations of them) where each pixel is only 1 higher/lower than the previous, but at the point I've gotten to it seems that the transform for whether a pixel is included or not is not linear (though this in part is most likely due to the rounding that occurs when ticking H/S/L up and down, perhaps I should start with just RGB. And additionally there will be some relative scaling due to the tolerance slider being percentage based) So, given that this means reversing it will take longer, I figured I'd simply ask if I could know what the algorithm paint.net uses for its tolerance level inclusion/exclusion calculations is (i.e. for the magic wand, paint bucket, etc.). This is assuming no anti-aliasing (though that part would be nice too). I'm making a plugin that needs a tolerance slider and I want the behavior to be as close to the standard tools as possible; however, given that the implementation of this feature is potentially something that separates Paint.NET from its competitors, I can understand if whoever knows it would rather not share. Edited September 17, 2020 by oblivioncth Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.