Jump to content

White stripes on the cut edges of the cut out areas in the image.


Recommended Posts

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.

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

image.png.3c4f4d4e3b4e964e26704f7558f16c07.png

Glad we got this sorted out.

Edited by AndrewDavid
  • Like 1

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:
 

shot-20201103-075723.png

 

Edited by ZerTerO
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...