vic Posted March 7, 2013 Share Posted March 7, 2013 (edited) Steps to reproduce : Create a new image Fill it with any non-black color with an alpha channel of zero Save the image as 32 bit PNG Reload the image -> the color is now 000000 instead of the chosen color. Edit: There is also loss of precision of the color with small but non-null alpha values. Edited March 7, 2013 by vic Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 7, 2013 Share Posted March 7, 2013 This is working correctly according to how the math works out. It is not a bug. If you want to preserve that alpha information, you must save as PDN and not PNG. 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...
vic Posted March 8, 2013 Author Share Posted March 8, 2013 If I set a pixel to some specific value, the program should not change that value. It is not a math issue but a matter of preserving the integrity if the data. This is relevant because in some contexts like OpenGL textures, the color information of pixels is used when resizing even if the alpha channel is zero. Link to comment Share on other sites More sharing options...
BoltBait Posted March 8, 2013 Share Posted March 8, 2013 Then they are not using those files in a standard way. According to the standard, if alpha is 0 then R, G, and B are undefined. If OpenGL wants to use that data they should define their own graphics format. You really can't fault Paint.NET for following the standard in this case. Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
vic Posted March 8, 2013 Author Share Posted March 8, 2013 Could you point out where in the standard it says that the RGB values are undefined when alpha is 0? The closest I've found is the section on alpha channel creation : http://www.w3.org/TR/PNG/#12Alpha-channel-creation The use case for preserved colors when alpha=0 is clearly mentioned. Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 8, 2013 Share Posted March 8, 2013 I told you why it happens and I would elaborate further but now you're getting rather argumentative about it (plus this has been asked and answered a few other times, IIRC, so you can search for it). It is not a math issue I just said it's related to the math involved. I wrote the software. Therefore, it is not a math issue? Not exactly a QED moment. Look man, I'm giving this software away for free. If it doesn't do exactly what you want it to do, then you'll just have to find something else. Thread Closed 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