Grey borders appear on rectangles when exporting to PNG (scaled)
When exporting an artboard to PNG (File > Export > Save for web), dark borders randomly appear, especially on light coloured rectangles.
– "Type Optimized" gives better results than "Art Optimized" (although the issue is originally not type related), but still not 100% perfect in certain cases (shadows...).
– The issue depends very much on the exact export resolution. In my case, I export 1600x900 artboards to 1920x1080 PNG files, i.e. a 120% ratio, which seems to be the worst case. 110%, 121%, 130%, 150%... do not cause the same borders on coloured rectangles. Actually, in some cases, if I just add one single pixel to the export width (1921px rather than 1920), the unwanted grey line disappears. Or sometimes 121% rather than 120%.
-
I can confirm that.
Sometimes I deal with it with modifying the canvas size, when possible.
A permanent workaround I switched to is a script I wrote. It’s pretty custom and won’t a majority of users, but I can share it here, if you wish to look at it.