abcboy Posted July 3, 2021 Share Posted July 3, 2021 Images that already have 256 or fewer colors, whether as a result being converted to grayscale or being from a format with a palette, are being dithered unnecessarily on save. I believe this is a regression in 4.2.16. This is particularly concerning because it makes Auto-detect lossy for these PNGs. The following PNG-8 and GIF were generated externally: The files after being opened and saved with default settings in paint.net: There is now noticeable dithering on the previously solid square. 1 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 3, 2021 Share Posted July 3, 2021 I can confirm this is a bug -- there's a bug in the code that chooses colors from the palette table. When the palette is an exact match, the color chosen should also always be an exact match, but it's not. This introduces error, which then causes dithering. I'll look into it for the 4.2.17 update. 1 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 July 4, 2021 Share Posted July 4, 2021 Alright I've found the culprit. It seems to be due to floating-point precision. Simple as that. Should be easy enough to fix, and probably won't even have a performance hit (not that it matters with an image of this size) due to the new stuff provided in .NET 5 (which 4.2.17 has migrated to). 1 1 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 July 4, 2021 Share Posted July 4, 2021 I've got the fix, and am planning to push out an alpha for 4.2.17 soon. 1 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 July 7, 2021 Share Posted July 7, 2021 You can now grab the first alpha for 4.2.17: 1 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...
arc_light Posted July 31, 2021 Share Posted July 31, 2021 Sorry to necro but why is this still not pushed as a critical update? I've been converting hundreds of old scanned 8-bit BMP documents into PNGs using Paint.NET over the past 5 months and only now do I learn that all the conversions I've done since around April/May have quality losses in them! Which, by the way, I can't redo since I deleted the originals because I had foolishly assumed that something as basic as saving fully lossless PNGs was a safe and reliable operation for an image editor in 2021. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 31, 2021 Share Posted July 31, 2021 Sorry about that, I'm still getting the new update ready. It'll be released soon. You can already install an alpha of 4.3: 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.