MJW Posted November 2, 2020 Share Posted November 2, 2020 2 hours ago, AndrewDavid said: I have been able to reproduce the issue on my PC viewing the saved PNG in Windows photo If you reload the image into PDN, does the Color Picker show transparent white in the transparent areas? Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 (edited) Yes it does. Have we discussed the possibility it is an issue with Microsoft Photo Viewer. Not Paint.Net. As soon as I go into edit mode, the white lines disappear. Edited November 2, 2020 by AndrewDavid Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 55 minutes ago, AndrewDavid said: Yes it does. Have we discussed the possibility it is an issue with Microsoft Photo Viewer. Not Paint.Net. I think it's very likely a bug in Microsoft Photo Viewer, not PDN. The "color" of transparent pixels shouldn't change the display. I'm quite curious why some people always get transparent black in their PNG files, while others don't. Would you mind trying one more thing? Please fill a region in an image with transparent red (i.e., red with an alpha of 0), save it as a PNG file, then see how it displays in Photo Viewer, and see if it still contains transparent red when the image is opened again in PDN. I'd like to know if your PNG files always contain transparent white for transparent pixels, or if they preserve the color components in transparent pixels. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 5 minutes ago, MJW said: red with an alpha of 0 Would you believe Paint won't let me. It allows an alpha of 5 Red. When I try red @ 0 it converts to white @ 0 Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 13 minutes ago, AndrewDavid said: Would you believe Paint won't let me. It allows an alpha of 5 Red. When I try red @ 0 it converts to white @ 0 I'm not sure I was clear about what I was requesting, or perhaps I misunderstood something in your previous comment. What I was asking for is for you to open an image in PDN, set the Primary Color to transparent red (R=255, G=0, B=0, A=0), fill a rectangle with the color, then save the image as a PNG file. Then I wanted you to see what it looked like in Photo Viewer, and check if when reopened in PDN, the transparent pixels were still transparent red. Perhaps could @ZerTerOalso try this. (If I did that on my system, the PNG file would contain transparent black for the transparent pixels.) Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 When I try to fill with Red (R=255, G=0, B=0, A=0) Paint changes it to R255, G255, G255, A=0) When I try to fill with Red (R=255, G=0, B=0, A=1) it works as expected When I try to fill with Red (R=255, G=0, B=0, A=5) Here is what it looks like in Photo Notice how it darkens the borders. Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 5 minutes ago, AndrewDavid said: When I try to fill with Red (R=255, G=0, B=0, A=0) Paint changes it to R255, G255, G255, A=0) Why do you say "Paint"? I thought this is about Paint.NET. Why should I care what Paint does? Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 Lazy fingers. I only talk about Paint.Net. or PDN in the future. Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 Sorry for my confusion, but Paint is the name of MS's old image editor. Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 26 minutes ago, AndrewDavid said: When I try to fill with Red (R=255, G=0, B=0, A=0) Paint changes it to R255, G255, G255, A=0) When you say "paint[.NET] changes it to R255, G255, G255, A=0, I assume you mean that that's what it's changed to in the PNG file. Only the case where alpha is zero matters to me. Obviously if alpha is nonzero, the color components must be preserved, in order to make PNG a lossless format. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 5 minutes ago, MJW said: I assume you mean that that's what it's changed to in the PNG file. While being open in PDN, it doesn't matter if it's a PNG or PDN File. If the alpha is 0, Paint.Net converts it to R255,G255,B255,A=0 Can you fill an area with R=255,B=0,G=0,A=0? Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 9 minutes ago, AndrewDavid said: While being open in PDN, it doesn't matter if it's a PNG or PDN File. If the alpha is 0, Paint.Net converts it to R255,G255,B255,A=0 I'm not sure what that means. PDN never converts one transparent color to another in the open image. However, when an image is saved as a PNG file, the transparent colors are changed in the file, itself, but not in the image. They aren't changed in a PDN file. 9 minutes ago, AndrewDavid said: Can you fill an area with R=255,B=0,G=0,A=0? Yes, set the Primary Color to R=255, G=0, B=0, A=0, and do Fill Selection. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 9 minutes ago, MJW said: Yes, set the Primary Color to R=255, G=0, B=0, A=0, and do Fill Selection. I have done that several times. I then check with color picker and it shows me R255,G255,B255,A=0 Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 33 minutes ago, AndrewDavid said: I have done that several times. I then check with color picker and it shows me R255,G255,B255,A=0 Are you certain you're doing Fill Selection, and not Erase Selection? Just to be absolutely clear, are you saying you: Set the Primary Color to R=255, G=0, B= 0, A=0; Make a rectangular selection; Execute Fill Selection from the Edit menu or use the shortcut Backspace; Check the color in the rectangle with the Color Picker; Find the color to be R=255, G=255, B=255, A=0? I'd find that to be very unlikely. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 Yes that is exactly what is happening. Maybe @Rick Brewster can confirm if its a bug or intended behaviour. Quote Link to comment Share on other sites More sharing options...
MJW Posted November 2, 2020 Share Posted November 2, 2020 8 minutes ago, AndrewDavid said: Yes that is exactly what is happening. Maybe @Rick Brewster can confirm if its a bug or intended behaviour. I just did it half a dozen times, with different colors, and every time the transparent color was the Primary Color I set it to. I note on this very thread Rick Brewster said: Quote You should be able to work around this by filling the area with transparent black. You can do that by setting the primary color to transparent black (choose black, then set Alpha/Opacity to zero) and using Edit -> Fill Selection (backspace). So what you report happens is clearly not the intended behavior; nor is it behavior I've ever seen. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted November 2, 2020 Share Posted November 2, 2020 (edited) 27 minutes ago, MJW said: Execute Fill Selection from the Edit menu or use the shortcut Backspace; OK - Using that method does work. I was using paint bucket and Paintbrush before. So to answer your original question So with the Alpha set to 0 and R255. This is what appears in Photo Glad we got this sorted out. Edited November 2, 2020 by AndrewDavid 1 Quote Link to comment Share on other sites More sharing options...
MJW Posted November 3, 2020 Share Posted November 3, 2020 Thanks! That's what I expected, but I'm glad to have it confirmed. Seems like that's clearly a problem with the Photo Viewer, not PDN. Wonder what causes it. EDIT: Hmm, actually it isn't necessarily what I expected. It's what I expected the Photo Viewer would do if the image contained transparent red, but I didn't know whether or not to expect that your PNG file would contain the transparent color in the image, or if it would always contain transparent white, the way it always contains transparent black in my PNG files. Quote Link to comment Share on other sites More sharing options...
ZerTerO Posted November 3, 2020 Author Share Posted November 3, 2020 On 10/30/2020 at 5:00 PM, Rick Brewster said: The only difference I'm seeing between the PNGs saved with GIMP vs PDN is that GIMP filled the area with transparent black (#00000000) whereas PDN filled it with transparent white (#00FFFFFF). They're equivalent, but for some reason Photos is showing a white border. On 10/30/2020 at 5:00 PM, Rick Brewster said: I may also change PDN to fill with transparent black, although that might cause problems with other people's workflows ... I think that might solve the problem. On 11/1/2020 at 11:09 PM, ZerTerO said: Wouldn't it be an option if the user could choose the transparent color in the settings? And that would be the option that could work too. Quote Link to comment Share on other sites More sharing options...
ZerTerO Posted November 3, 2020 Author Share Posted November 3, 2020 (edited) 6 hours ago, MJW said: Seems like that's clearly a problem with the Photo Viewer, not PDN. Wonder what causes it. I don't think the Photo Viewer is the problem as these edges are also visible in games that use these edited textures. Quake III Arena - Screenshot: Edited November 3, 2020 by ZerTerO Quote Link to comment Share on other sites More sharing options...
MJW Posted November 3, 2020 Share Posted November 3, 2020 30 minutes ago, ZerTerO said: I don't think so, as the problem is also visible in games where these edited textures are used. Quake III Arena - Screenshot: I don't care if it occurs in a dozen programs. Displaying images differently because of the color components in transparent pixels isn't reasonable behavior. The only exception I can see is if the file represents something other than an image, such as a height map. In the case of Photo Viewer, it's nothing but a run of the mill image. I've said on a number of occasions on this forum that I'd prefer transparent pixels be (0, 0, 0, 0); but when the alpha of pixels is 0, the way programs display the pixels shouldn't depend on the RGB color components. Quote Link to comment Share on other sites More sharing options...
ZerTerO Posted November 3, 2020 Author Share Posted November 3, 2020 I just wanted to draw your attention to a problem that I noticed while using paint.net. I don't have this problem with the GIMP, or any other photo editing program I use... 😑 It could even be reproduced. But apparently that's how it should be. It's a shame because I can no longer use paint.net for that reason alone. I don't want to manually set the transparent color to black every time so as not to get the white edges. Unfortunately I have to edit the textures with GIMP... Thank you for the information and support. Quote Link to comment Share on other sites More sharing options...
MJW Posted November 3, 2020 Share Posted November 3, 2020 Bye. Quote Link to comment Share on other sites More sharing options...
ZerTerO Posted November 3, 2020 Author Share Posted November 3, 2020 29 minutes ago, MJW said: Bye. I have no idea why you are being rude to me, but I want to say a big thank you to Andrew David and Rick Brewster ... Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 3, 2020 Share Posted November 3, 2020 7 hours ago, MJW said: Bye. Don't be rude 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.