Jump to content

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


Recommended Posts

Hello dear forum members,

 

when I cut out an area in an image with an alpha channel, Paint.Net gives me white streaks on the cut edges. Gimp doesn't have these cut edges. These edges can also be seen in the representation in the game. In Windows 10 "Photos" you can see these edges in a direct comparison. The image is a texture from the game Quake 3 Arena.

 

I added a PNG file as an attachment. On the left the file was edited with Paint.Net and on the right with GIMP. Does anyone have any idea how I can avoid these white edges?

 

Best regards

ZerTerO

 

quake3arena_model_anarki_cuttest_paintnet_gimp_small.png

Edited by ZerTerO
Link to comment
Share on other sites

9 hours ago, ZerTerO said:

when I cut out an area in an image with an alpha channel, Paint.Net gives me white streaks on the cut edges.

 I'm not clear on what you mean. What were the operations you used to cut the edges?

 

Was the image originally PNG, or was it some other format? Was it saved directly as a PNG (with the white edges), or was it saved in some other format, then reloaded and combined to form the image saved as a PNG?

 

Finally, what is a "restrained area"? I'm not familiar with that term.

Link to comment
Share on other sites

  • ZerTerO changed the title to White stripes on the cut edges of the cut out areas in the image.

 I'm not clear on what you mean. What were the operations you used to cut the edges?

>> Select area with S and delete with DEL

 

 

Was the image originally PNG, or was it some other format? Was it saved directly as a PNG (with the white edges), or was it saved in some other format, then reloaded and combined to form the image saved as a PNG?

>> I tested it with the original TGA format (from Quake III Arena) and a PNG version (from Quake Live). The edited image was saved directly as a PNG. Always with the same result. With GIMP, I don't have these white cut edges. Regardless of the file format.

 

Finally, what is a "restrained area"? I'm not familiar with that term.

>> I have now corrected the topic title.

Link to comment
Share on other sites

12 hours ago, ZerTerO said:

Select area with S and delete with DEL

Not certain what "select area with S means," but in any event, I've never seen a white edge after deleting something, so unless you can explain the steps to reproduce the problem, you're unlikely to get an useful response. Frankly, the terseness of your response struck me as suggesting you were offended that I asked for more details. Perhaps it wasn't meant that way.

Link to comment
Share on other sites

Try setting the selection anti-aliasing of the selection to off (pixelated)

 

toolbarSelectionClipping.png

 

REF: https://www.getpaint.net/doc/latest/Toolbar.html#20

Link to comment
Share on other sites

No, I am and was not offended, just had very little time. Here is my approach. I demonstrate by using an image from the getpaint.net website:

 

1. Open Image and select an area with S (Shortkey)

59803513_1-select-2020-10-2710_33_38-Greenshot.jpg.b68c586781dfcca610b87645ea950bcc.jpg

 

2. Highlight the area to be removed

2-mark-2020-10-27-10-33-38-Greenshot.jpg

3. Remove area with DEL / ENTF (in Germany)

3-delete-2020-10-27-10-33-38-Greenshot.j

4. This is how it looks in the end

4-deleted-2020-10-27-10-33-38-Greenshot.

5. Save image...

5-deleted-2020-10-27-10-33-38-Greenshot.

6. ...as PNG-file

6-deleted-2020-10-27-10-33-38-Greenshot.

7. And now open the picture with Windows Photos and the white borders are visible.

7-result-2020-10-27-10-33-38-Greenshot.j

8. Zoomed in...

8-resultzoom-2020-10-27-10-33-38-Greensh

 

As already written, these edges are also visible in the game. Interestingly, they are not visible with IrfanView or XnView. Only with Windows Photos and in the game (Quake III Arena).

 

Thank you for the help and look forward to your answer. You can test yourself with any picture at any time. With the GIMP, these borders do not appear. "Antialiased / Pixelated selection quality" does not change anything.

 

Download: Output files from Paint.Net and GIMP

 

Best regards

ZerTerO

Link to comment
Share on other sites

Another way:

 

1.  After you delete the area go to the image where you deleted it from and use the color picker :ColorPickerTool: to get the same black color.

2.  Make a new layer and move it below the image & add the black color.

3. Flatten.

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

22 minutes ago, Pixey said:

Another way:

 

1.  After you delete the area go to the image where you deleted it from and use the color picker :ColorPickerTool: to get the same black color.

2.  Make a new layer and move it below the image & add the black color.

3. Flatten.

The cut out area should remain transparent...

Link to comment
Share on other sites

At step 4 please try using AA's Assistant (you may need to use it twice) before saving at .png and see if it makes any difference.

 

  • Upvote 1

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

12 hours ago, ZerTerO said:

Only with Windows Photos and in the game (Quake III Arena).

 

That seems like a pretty significant detail.

 

What are the PNG settings when you save the file in Paint.NET? The settings are displayed in a dialog titled "Save Configuration" (or the German equivalent) just before the image is saved

Link to comment
Share on other sites

Quote

At step 4 please try using AA's Assistant (you may need to use it twice) before saving at .png and see if it makes any difference.

 

I don't want to use AA's Assistant. As I said, in my opinion this is a bug in Paint.Net. I have no such problems with the GIMP. Even with the standard settings.
 

Also included a download so everyone can check the pictures: https://workupload.com/file/n4nucWrmpYS

Would be nice if we could find a solution without any external plugins... 😉

Link to comment
Share on other sites

I have not been able to replicate the issue. Anyone else?

If it only does that with 2 programs, then it probably is not a PDN issue per se.

 

If the area is to be blocked out by a solid colour, why not do a filled rectangle with no border.

Have I missed the point entirely?

THiGVp.png

Knowledge is no burden to carry.

 

April Jones, 2012

 
Link to comment
Share on other sites

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.

 

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

 

I may also change PDN to fill with transparent black, although that might cause problems with other people's workflows ...

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

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.

I think that's exactly the problem. I don't know why, but the transparent white areas cause a white border on certain image renderers. Why does PDN use white areas? GIMP, Serif Affinity Photo, and Corel PaintShop Pro (i've tested these programs) don't do this.

Link to comment
Share on other sites

On 10/30/2020 at 5:00 PM, Rick Brewster said:

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

That worked!!! Apparently that was the problem. It might actually be necessary to change the color to transparent black😬

 

Thank you for the help and for your patience. I can still create a video of my process while editing the image file, but it's actually simple: Open the image, mark the area, delete the area, save the image as a PNG (all with standard settings).

 

Wouldn't it be an option if the user could choose the transparent color in the settings?

 

Many thanks again! 😁👍

Edited by ZerTerO
Typo and additional information.
Link to comment
Share on other sites

1 hour ago, ZerTerO said:

Thank you for the help and for your patience. I can still create a video of my process while editing the image file, but it's actually simple: Open the image, mark the area, delete the area, save the image as a PNG (all with standard settings).

 

 

I've done that, yet never produced white edges when viewing the resulting images with Windows Photo.

 

Here's something for you to try: Do the steps that produce the problem, and confirm that it does produce the problem. Now open the image again in PDN, and use the Color Picker to see what color is in the transparent region. When I read the image back into PDN, the transparent pixels are transparent black, even though before I saved the image, they contained transparent white. If you get transparent white instead, that explains why you get different results.

 

However, if you do get transparent white, the question is why? As was recently discussed on this forum, all transparent pixels are converted to transparent black when images are saved in PNG files. I know almost nothing about this, but if your files contain transparent white, I wonder if somehow a different routine, in a different DLL, is being used to save PNG files.

Link to comment
Share on other sites

2 hours ago, ZerTerO said:

Why does PDN use white areas? GIMP, Serif Affinity Photo, and Corel PaintShop Pro (i've tested these programs) don't do this.

 

It's just an old, obsolete design decision from 2004. Alpha composition wasn't supported well; heck, v1.0 didn't even have the checkerboard background, IIRC. "Transparent" areas were just rendered with the color in the RGB components. So it would've been weird to delete/erase an area and have it turn black. 

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

9 hours ago, MJW said:

However, if you do get transparent white, the question is why? As was recently discussed on this forum, all transparent pixels are converted to transparent black when images are saved in PNG files. I know almost nothing about this, but if your files contain transparent white, I wonder if somehow a different routine, in a different DLL, is being used to save PNG files.

Hello. I uninstalled paint.net and deleted the following directories:

 

%LocalAppData%\paint.net

%ProgramFiles%\paint.net

 

I then reinstalled paint.net and did exactly the same with the picture as described here. I get the white borders and the information is saved as transparent white in the PNG file. So there are no plugins installed and I also have these white borders when I save the picture as TGA (which Quake III Arena needs).

 

 

 

2020-11-02-08-58-09-pdn40-kirkland-new-p

I have an unchanged Windows 10 installation and I was able to reproduce this problem on 2 different notebooks and on 2 other PCs. I don't think it's because of my Windows and program installation. The information is saved as transparent white by default...

 

The result is far worse when I use the Lasso Select (Shortcut S, S) tool.

2020-11-02-09-28-17-pdn40-kirkland-new-p

 

We can also make an appointment and I'll demonstrate via TeamViewer. 😄

 

Edited by ZerTerO
Additional Information and Picture.
Link to comment
Share on other sites

1 hour ago, ZerTerO said:

I then reinstalled paint.net and did exactly the same with the picture as described here. I get the white borders and the information is saved as transparent white in the PNG file.

 

As I said before, I know nothing about how PDN saves PNG files. However, I wouldn't be surprised if PDN doesn't contain the routines to save PNG files, but instead relies on routines built into Windows to do it. Perhaps there's something specific about your computer's version of Windows, or other programs installed on your computer, that causes it to save PNG files differently than on most other people's computers.

Link to comment
Share on other sites

28 minutes ago, MJW said:

Perhaps there's something specific about your computer's version of Windows, or other programs installed on your computer, that causes it to save PNG files differently than on most other people's computers.

I have a new Windows 10 installation and no additional software on the PC. I reinstalled the computer especially for this to test this statement.

Link to comment
Share on other sites

6 hours ago, MJW said:

Perhaps there's something specific about your computer's version of Windows, or other programs installed on your computer, that causes it to save PNG files differently than on most other people's computers.

I have been able to reproduce the issue on my PC viewing the saved PNG in Windows photo.

I don't think it's an issue that can be corrected in the short term.

Just an issue that can be corrected with the different ways suggested in this thread.

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

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