Import or open transparent PNG in Illustrator results with black edges


Whenever I open or import a PNG with transparency to Illustrator I get these black pixels along the edges. The only way I've found to get rid of the black pixels is to rasterise it with a white background, if I try rasterise it with transparency preserved the black blocks remain. I do not want to have to replace all of these transparent PNGs with PSDs. It is crucial to my current workflow that I use PNGs because I am using Photoshop Extract Assets; so if I go to Photoshop and make changes to the PNG it automatically extracts the asset and then in turn automatically updates the linked PNG in Illustrator. Another alternative workaround I can think of is to extract to TIFF instead, however, I'm pretty sure you should be able to import transparent PNGs to Illsutrator without problems... so any idea what's causing my problem?

The original PNG with transparency

Once imported or opened in Illustrator

4/30/2015 8:32:00 AM

Possible problem one

This is caused by a pretty central concept that does sometimes crop up. It more commonly a problem in video production but its also good to know when isolating objects form background.

There is no such thing as a transparent pixel. There is only a color and how transparent that pixel is. When you cut color out to form the alpha its contaminated by the matte fringe. So if you have a pixel with 50% black and 50% white and cut it out so its 50% transparent it is still 50% black. This is not visible in all conditions but it is a problem.

So in addition to masking you need to remove the contaminant color from the layer. Now there are tools that do this in the in Layer → Matting sub menu. The different tools use different methods. Whichever is better is up to you and the situation at hand. It is also possible to do this calculation manually for an example why you'd do this see this post.

Possible problem two

If you extract assets with PNG-8 option then your PNG does not have a full alpha channel. Thus the fringe has to be put in as there is only indexed colors but only one level of transparency. While the PNG standard as understood by browsers does indeed make it possible to have 8 bit PNG files with multi level alpha, Adobe does not support this. So youy still need to crunch the images with a external tool.

4/13/2017 12:46:00 PM