Sharkoo Posted May 17, 2006 Share Posted May 17, 2006 public byte GetIntensityByte() { return (byte)((7471 * R + 38470 * G + 19595 * >> 16); } is wrong? public byte GetIntensityByte() { return (byte)((7471 * B + 38470 * G + 19595 * R) >> 16); } Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted May 17, 2006 Share Posted May 17, 2006 Moved to Coding / Development No, it's correct. Why would that be wrong? 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...
Sharkoo Posted May 18, 2006 Author Share Posted May 18, 2006 in GetIntensity() return ((0.114 * (double) + (0.587 * (double)G) + (0.299 * (double)R)) / 255.0; in GetIntensityByte() return (byte)((7471 * R + 38470 * G + 19595 * >> 16); I sure one is wrong. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted May 19, 2006 Share Posted May 19, 2006 Yes, they are indeed swapped in GetIntensityByte() ! I blame Tom :twisted: Fix should be in the next service release (2.63, whenever that is). 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.