noisynose Posted July 9, 2008 Share Posted July 9, 2008 The "Add noise" effect is pretty "jumpy" for low amounts of noise, i.e. moving from 11 to 12 has a huge effect. It could be easily fixed by changing int dev = this.intensity * this.intensity / 64; ... dstPtr->R = Utility.ClampToByte(srcPtr->R + ((r * dev * 16 + 32768) >> 16)); dstPtr->G = Utility.ClampToByte(srcPtr->G + ((g * dev * 16 + 32768) >> 16)); dstPtr->B = Utility.ClampToByte(srcPtr->B + ((b * dev * 16 + 32768) >> 16)); into int dev = this.intensity * this.intensity / 4; ... dstPtr->R = Utility.ClampToByte(srcPtr->R + ((r * dev + 32768) >> 16)); dstPtr->G = Utility.ClampToByte(srcPtr->G + ((g * dev + 32768) >> 16)); dstPtr->B = Utility.ClampToByte(srcPtr->B + ((b * dev + 32768) >> 16)); Additionally I think the line i = (1867 * r + 9618 * g + 4899 * >> 14; was probably meant to be i = (4899 * r + 9618 * g + 1867 * >> 14; Cheers Quote Link to comment Share on other sites More sharing options...
MiguelPereira Posted July 9, 2008 Share Posted July 9, 2008 What are the point of these modifications? performance only? or does it remove noise better? Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
noisynose Posted July 11, 2008 Author Share Posted July 11, 2008 This function is "add noise", not remove Basically, the first and most important fix is there to give better control on the amount of noise you add, while the second one is there to fix a minor bug in the coloration of the noise. (and yes, there is a very tiny performance improvement, but that's not really the point) Quote Link to comment Share on other sites More sharing options...
MiguelPereira Posted July 11, 2008 Share Posted July 11, 2008 This function is "add noise", not remove Basically, the first and most important fix is there to give better control on the amount of noise you add, while the second one is there to fix a minor bug in the coloration of the noise.(and yes, there is a very tiny performance improvement, but that's not really the point) Sorry my bad. :oops: my mind read 'remove' instead of 'add'... Anyways why don't you make a plugin out of it? something Add Noise+ and add a few more features, like the color range of the noise or something... Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
noisynose Posted July 11, 2008 Author Share Posted July 11, 2008 It's just bugfixes, it doesn't belong in an extra plugin... I mean I'm just proposing a patch, take it or leave it, though I hardly see any reason for refusing it apart from backward compatibility -- and I don't think it's a concern for Paint.net. Or maybe this is not the right place to submit patches?? Quote Link to comment Share on other sites More sharing options...
MiguelPereira Posted July 11, 2008 Share Posted July 11, 2008 It's just bugfixes, it doesn't belong in an extra plugin... I mean I'm just proposing a patch, take it or leave it, though I hardly see any reason for refusing it apart from backward compatibility -- and I don't think it's a concern for Paint.net. Or maybe this is not the right place to submit patches?? No... What I mean is that if Rick wanted to include your upgrade to add noise, I dunno but I think he'd probably already answered, BUT the changes you made (I've been comparing the code, I know coding, just not much of C#) and it seems to be a nice thing to release as your own plugin, just add a few things not to be only some upgraded effect... Just a though anyways... Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 11, 2008 Share Posted July 11, 2008 I've filed a bug with this info in it -- I'll check into it when it comes time to release an update to 3.xx. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 4, 2008 Share Posted August 4, 2008 I've implemented these changes for the next update. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.