Skip to main content
Participating Frequently
December 5, 2021
Answered

Half-transparency outline added when exporting to png

  • December 5, 2021
  • 3 replies
  • 1136 views

Hi all,

I know this is going to cause some upset to pro designers, but I'll try anyway.

I've been using CS5 for maybe 10 years now, but I just recently started needing to export to png. I noticed that no matter the ppi I export to (72, 150 or 300), an weird outline is added to some of the objects - not all. It has the same volor as the objects, but with a lower transparency.

I made a test just to show what it is because I can't find anything online that solved this for the CS5 (unsurprisingly).

I tried everything: anti-aliasing (non, type- and art-optimized), interlaced and not interlaced, using the artboard or not... everything I could try on my CS5.

Final note: I asked a friend to try on her AI. She has CS6, another old-school user, but she has the exact same problem. She has more options, e.g. 24bit, and we've tried just as much, but the problem is not solved.

 

Is this just an issue I have to accept, or is there a way to solve it?

Many thanks to anyone who will take some time to share.

 

This topic has been closed for replies.
Correct answer Ton Frederiks

And, probably more helpful to solve your problem: use Pixel Preview and Align to Pixel Grid in the Transform Panel.

3 replies

Ton Frederiks
Community Expert
Ton FrederiksCommunity ExpertCorrect answer
Community Expert
December 5, 2021

And, probably more helpful to solve your problem: use Pixel Preview and Align to Pixel Grid in the Transform Panel.

Monika Gause
Community Expert
Community Expert
December 5, 2021

And always be careful with "Align to pixel grid" as a general option as it can also cause distress

https://www.vektorgarten.de/problems-align-to-pixel-grid.html

Ton Frederiks
Community Expert
Community Expert
December 5, 2021

To add to what Monika said:

You can try this:

In Illustrator set your units to pixels or points.

Your art and artboard should not contain fractional pixels (points).

Check your Rulers, are they Global rulers (Ctrl click a ruler to check)?

Check the Artboard options; are the top left X/Y coordinates whole numbers (no fractions)

Select and check the art in the Transform panel, are the width and height whole numbers, are the upper left X/Y coordinates  whole numbers?

Export the artboard at 72 ppi or a multiple thereof (144, 216, 288).

MuvuthAuthor
Participating Frequently
December 6, 2021

Hello and thanks for your comment.

You've set me on the right track! I tried Pixel Preview, didn't know about it, and there it is! I can now see where the problem will occur! I haven't figured out how to solve it yet, but at least I won't have to export and check multiple times for each file! Thank you very much!

Do you have any idea how to put first step to use? I'm adding a screenshot just to share in any case. As you'll see, left is AI, right is the resulting file. 72 ppi.

 

As for the details: I only use pixels, create using values (working on a pixelated project now so it's all squares) and align inputting x/y position and size. I also move or copy objects using Cmd-Shift-M so they're theoretically pixel perfect. I also double check all 4 values (x, w, w, h) at two opposite corners of each square before exporting to ensure that I didn't miss anything, and confirm that all values are whole.

CS5 only has 3 options to export to png: 72, 150 and 300. I guess things were more print-based back then. In any case, I tried them all (today's screenshot @ 72), but they all give the same results with any type of anti-aliasing (none, art-, and type -optimized). And finally yes, Global Rulers.

MuvuthAuthor
Participating Frequently
December 6, 2021

PS: For now, I'm just recreating objects when this happens. But I noticed that in Pixel View tha problem doesn't occur, or it happens so rarely it hasn't occurred yet. So, again, very helpful hint you gave me there.

Monika Gause
Community Expert
Community Expert
December 5, 2021

Your objects need to be aligned to the pixel grid.

Resampling is not good. If you export at other resolutions than multiples of 72 ppi, resampling will be applied.