Half-transparency outline added when exporting to png

Community Beginner ,
Dec 05, 2021 Dec 05, 2021

Copy link to clipboard

Copied

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.

 

TOPICS
Import and export

Views

104

Likes

Translate

Translate

Report

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

Adobe Community Professional , Dec 05, 2021 Dec 05, 2021
And, probably more helpful to solve your problem: use Pixel Preview and Align to Pixel Grid in the Transform Panel.

Likes

Translate

Translate
Adobe Community Professional ,
Dec 05, 2021 Dec 05, 2021

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Dec 05, 2021 Dec 05, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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 Beginner ,
Dec 06, 2021 Dec 06, 2021

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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 Beginner ,
Dec 06, 2021 Dec 06, 2021

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Dec 06, 2021 Dec 06, 2021

Copy link to clipboard

Copied

Good to hear that helped. CS5 and CS6 are a long time ago, and I cannot check them anymore since I needed to update my system to run the latest Illustrator version.

Likes

Translate

Translate

Report

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 Beginner ,
Dec 06, 2021 Dec 06, 2021

Copy link to clipboard

Copied

I have already gotten more than I hoped for. My grampa would laugh at me for using CS5.

Just to share with you: I have experimented a bit, and noticed that the artboard was not aligned to the pixels in the Pixel View. It's 0.5 px beyond, both at the top and the bottom. Some objects will sometimes (when, I don't know) align to the artboard instead of the Grid, so they'll be 0.5px out of place (although the values in the Transform panel are round numbers) - and the weird halo appears there.

I'm now manually resizing the artboard to fit the Pixel Grid (if that's its name), problem solved, but I do feel this has something to do with other settings you mentioned, so I'll keep checking menus to find out.

I'm adding yet another screenshot just for the sake of sharing.

 

Can't thank you enough, this is a fairly vast project and your hint is saving a huge amount of time.

Cheers!

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Dec 06, 2021 Dec 06, 2021

Copy link to clipboard

Copied

Good to hear it is going well. You mentioned manually resizing the artboard to align to the pixelgrid, you can also double click on the top left intersection of the rulers to set the XY zero point for the artboard. 

Likes

Translate

Translate

Report

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 Beginner ,
Dec 06, 2021 Dec 06, 2021

Copy link to clipboard

Copied

LATEST

Awesome tips, very valuable for an amateur like myself.

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Dec 05, 2021 Dec 05, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Dec 05, 2021 Dec 05, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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