1

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

2

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.

  • Hi, thanks very much for your answer. I guess there is something I don't understand because I'm still having problems. First I checked that I am extracting the assets as PNG-32. Then I tried the same file but this time used the Save For Web and saved it as PNG-24 with transparency (PNG-32). The one that went through the Safe For Web process seems to be working fine, but the Extract Assets method is giving me the same problem. – IOIIOOIO Apr 30 '15 at 9:42
  • Hi, sorry I just thought I should full you in, I'm not trying to extract (deep etch) an object from a background. This is an image that was created from scratch in Photoshop with a transparent background. I think my problem is more related to "Possible problem two" in your answer. – IOIIOOIO Apr 30 '15 at 10:15
  • Please excuse all these comments, I'm sort of figuring things out as I go along. I'm very confused now because I tried the same test I did earlier, but with a different image. This time both the "Save For Web" and "Extract Assets" methods gave me the same problem. – IOIIOOIO Apr 30 '15 at 10:21
  • @IOIIOOIO is not impossible your problem over exceeds the scope of this answer. But in that case you may need to add some more info. – joojaa Apr 30 '15 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.