Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Unwanted transparent border on some .png exports

New Here ,
Nov 03, 2025 Nov 03, 2025

Hello Everyone,

 

I've had this issue for a little while now and I can't see to find the solution doing a Google search. If I have an image in Photoshop that I'm finished with and I need to export it as a .png file, I'm often gettting a transparent border that's visiable on the exported file. If I add that image to a webpage, there's a faint grey line visible around the frame. If I bring that same exported .png back into PS and zoom in, there's a visible frame all around the image that looks to have transparent pixels. Those transparent pixels are not present in the original PS file.  I'm assuming it's a simple fix, I just can't seem to find it. I do drop the pixel size dimensions a little before exporting the .png. As an example, the original PS file might be 1412 W x 1521 H, and I downsize to 928 W x 1000 H for the .png export.

 

Has anyone else had this happen, and is there a solution?

 

I've attached close up screenshots of a white corner area where in the original PS file you can see it's solid white to the edge, but on the exported and then imported .png file, you can see the transparent border. The dark grey area is just the background PS canvas in the screenshot.

 

Screenshot 2025-11-02 at 1.14.50 PM.pngScreenshot 2025-11-02 at 1.14.35 PM.png 

TOPICS
Actions and scripting , macOS
167
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 03, 2025 Nov 03, 2025

If the original isn't flattened, try duplicating the doc and flattening before resizing and or exporting, then close the dupe without saving.

Translate
Adobe
Community Expert ,
Nov 03, 2025 Nov 03, 2025

If the original isn't flattened, try duplicating the doc and flattening before resizing and or exporting, then close the dupe without saving.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2025 Nov 03, 2025

The original PS doc was just one layer. It was an old photograph that I cleaned up and restored. So I don't think it's a layering issue. Thank you for the suggestion though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 03, 2025 Nov 03, 2025

There is some kind of margin.

 

Larry
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2025 Nov 03, 2025

If it's a floating layer and not a flattened Background layer, then it's probably edge interpolation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2025 Nov 03, 2025

Yes, @Stephen Marsh points to something important: With a floating layer, edge pixels will be interpolated in a resample, resulting in semi-transparent edges.

 

This is fine if you know about it and can take your precautions, but it can easily catch you by surprise. 

 

Would it be feasible/practical to lock all edge pixels in resampling? Any scenarios where that is not desirable?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2025 Nov 04, 2025

My original .psd file has no extra or floating layers (see screenshot). It's just a single flattened layer that I save as the .png. Check out my post below about what I found regarding when this is and isn't happening. Might help with someone's solution.Screenshot 2025-11-04 at 8.58.52 AM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2025 Nov 04, 2025

@Chad 8675309 

 

It's a single floating layer which has transparency support as an intrinsic property.

 

It's not a special flattened Background (image) "layer" which doesn't support transparency.

 

The nuances between the two are important. Critically so in this situation when it comes to canvas edge pixel interpolation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2025 Nov 04, 2025

Thank you Stephen. What would I need to do to change that single layer so it's not acting as a floating layer?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2025 Nov 04, 2025
quote

Thank you Stephen. What would I need to do to change that single layer so it's not acting as a floating layer?


By @Chad 8675309


Flatten the image so that transparency is no longer possible for the single layer.


One can save the transparency as an alpha channel if you think that you may need it again, saving as PSD or another format supporting alpha channels.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2025 Nov 04, 2025

Thank you! Yes, that did the trick. In my head when people said flatten the image I though they were referring to multiple active layers just being flattened into one layer. As I only had one layer, I thought that was flattened. But I see now that I could right click that one layer and select "Flatten Image" which actually locked the layer and renamed as "Background". I learned something new. Thank you again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2025 Nov 04, 2025
quote

Thank you! Yes, that did the trick. In my head when people said flatten the image I though they were referring to multiple active layers just being flattened into one layer.


The English language term for that in Photoshop is "merge".

 

"Flattening" or "Flatten" has a very specific meaning.

 

https://helpx.adobe.com/au/photoshop/using/layers.html

 

quote

As I only had one layer, I thought that was flattened. But I see now that I could right click that one layer and select "Flatten Image" which actually locked the layer and renamed as "Background". I learned something new. Thank you again.


By @Chad 8675309


Now, if you resize the flattened image before exporting as PNG, is your problem solved?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 04, 2025 Nov 04, 2025

Yes. Thank you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 04, 2025 Nov 04, 2025
LATEST
quote

Yes. Thank you.


By @Chad 8675309

 

Great, please mark my original/first reply as a correct answer.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2025 Nov 03, 2025

When you export the PNG, make sure that Transparency is not selected.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2025 Nov 03, 2025

Maybe this will help with an answer. I'm getting that transparent border only when I adjust the size of the image first (slightly smaller) and then export as a .png. If I then bring that exported .png back into PS, I can see that transparent border. However, if I save the original PS doc as a .png at it's original dimensions, then bring that .png back into PS, there is no transparent border. I can then change the image size of that .png to the slightly smaller scale and save it. Close the doc and then bring it back into PS, and the transparent border is still gone. So the good news is, I have found a work around. However, I'd like to solve this without that second step of having to bring the saved .png at original scale back into PS and then making it smaller. As I'm processing hundreds of images, that doubles the steps needed. This was never an issue in years past, I've only noticed this glitch in the last year or so. Doe sany of that info help for a solution?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines