Skip to main content
Daniel Bevis
Participating Frequently
October 10, 2020
Answered

How to get rid of a small transparent border in exported PNG files?

  • October 10, 2020
  • 4 replies
  • 5474 views

When I export Illustrator artwork as a png [whatever] file, I get a one pixel grey border at the top and left edges.

I've found similar topics on this around the web, suggesting to align everything to the top-left corner of the Transform > Reference Point [they are], to using the pixel grid, whole pixels and PNG-24 format like so:

https://graphicdesign.stackexchange.com/questions/42280/white-border-around-transparent-png-after-illustrator-export

But everything leds to the final image [which leads to thin white lines when collaging more than one together for product templates online], and I really don't know what else to do now! 😕😕

Correct answer Ton Frederiks

Actually it is very easy to export a single pattern tile.

Drag rhe pattern swatch from the Swatches panel to the artboard.

In the Layers panel select the bottom path (it has no fill no stroke) from the pattern tile group.

Choose Object > Artboards > Fit to Selected Art

Double click the intersection of the rulers to reset the zero point.

Export with the Artboard option checked.

4 replies

Jacob Bugge
Community Expert
Community Expert
October 10, 2020

Daniel,

 

Apologizing for a possibly too silly question, but is your Artboard coinciding with the artwork, in other words also at whole pixels, at X = 0, Y = 0, W = 2400, H = 1702, for the upper left corner?

 

Daniel Bevis
Participating Frequently
October 10, 2020

Hi Jacob.

No, my Artboard's X and Y co-ordinates are different to the artwork's 0 and 0 [but changing the artwork's to the same results in it being somewhere different from said artboard]

Anna Lander
Inspiring
October 10, 2020

Save for Web is a legacy option, it can create some unexpected artifacts.

What about trying some other ways:

1. Make the filled rectangle some bigger than the artboard and export in Export As mode with Use Artboards option;

2. Make the filled rectangle some bigger than the artboard and export in Export for Screens mode with Artboards option chosen.

3. Export by Save for Web also having the rectangle some bigger than the artboard.

The sense is to have all the exporting area (= Artboard) assuredly covered by the image.

At least, I tryed all the ways now, and no transparent lines appeared.

Daniel Bevis
Participating Frequently
October 10, 2020

Thank you for all of that Anna!

Sadly, neither option changed anything, despite making the asset bigger than the artboard [and making sure the pixel count weren't now in the half digits]. 



If it were just a computer / display error, then zooming in all the way would surely give me the same result on the other lft and top hand sides of the exported image [but it doesn't]

Ton Frederiks
Community Expert
Community Expert
October 10, 2020

Did you use the pattern maker (Object > Pattern > Make) in Illustrator?

Did your Pattern tile contain fractions?

It seems like you filled a rectangle with the pattern. Is your artboard the same size as your rectangle?

 

Daniel Bevis
Participating Frequently
October 10, 2020

Hi Ton.
I don't use the Pattern Maker tool to create a pattern [as it's not easy to then get a repeating tile to export], but play around with larger / smaller scale square swatches from that panel after the fact. 

My finished Pattern and Artboard tile here are both 2400 X 1702 pixels, according to my Transform panel [i.e. not a swatch from the Swatches panel, but the non-clipped / divided elements themselves]

Ton Frederiks
Community Expert
Ton FrederiksCommunity ExpertCorrect answer
Community Expert
October 10, 2020

Actually it is very easy to export a single pattern tile.

Drag rhe pattern swatch from the Swatches panel to the artboard.

In the Layers panel select the bottom path (it has no fill no stroke) from the pattern tile group.

Choose Object > Artboards > Fit to Selected Art

Double click the intersection of the rulers to reset the zero point.

Export with the Artboard option checked.

Anna Lander
Inspiring
October 10, 2020

Did you use Snap to Pixel option?

Daniel Bevis
Participating Frequently
October 10, 2020

Hi Anna. Yes, I did