5

This question has already been asked a couple times: here and here*. Those question's answers do not satisfy me, however, and I think it is a slightly different issue. Besides, I'm using Illustrator CS6.

Say, I have a white object on a coloured background:

enter image description here

And I apply a clipping mask to it like so:

enter image description here

No matter my colour settings or way of exporting, I tend to end up with very visible coloured lines marking the places where the mask cuts off the white shape:

enter image description here

Is there a way to avoid this glitch? Oddly enough, it doesn't pop up when I punch out the object and then clip the resulting punched shape and place the result on the regular white background.

The fact that the offending line is lighter than the actual colour I use, makes me think it has something to do with pixel alignment. I do, however, kind of refuse to work with pixel alignment, because it prevents me from exact positioning. And I wonder how I would have to solve the issue on a clipping mask that is, say, hexagonal:

enter image description here

*Scott/SOIA's solution to this question, unchecking 'Anti-Aliased Artwork', doesn't do the trick for me, especially when exporting to *.jpg.

4
  • Have you tried, for the clipping box, setting the stroke to e.g. "align with inside" even if there is no stroke defined?
    – Yorik
    Jan 27, 2016 at 14:59
  • @Yorik Just did, but those options are greyed out, because there is no stroke defined.
    – Vincent
    Jan 27, 2016 at 15:05
  • OK, I can reproduce this: I made a similar file as yours where the clipping is "perfect or as expected"; I exported several JPG, differing only by ppi: 72,144,288,300,600, and 1200. The ones at 300ppi and 600ppi show the phantom line, the others are as expected.
    – Yorik
    Jan 27, 2016 at 18:15
  • 1
    No-AA fixes it at 600 and 300
    – Yorik
    Jan 27, 2016 at 18:19

3 Answers 3

4

Use the Window "Transparency". Group all the layers you want to mask and clic "Make a Mask". On the left of the button, two squares appeared. The one on the right is your mask. Make Black shapes to mask and white shapes to reveal. There won't be any lines on the export.

1
  • You just made my day. Works like a charm. Thanks so much!
    – Vincent
    Jan 14, 2021 at 17:23
3

I had the same issue tried a lot of stuff, and finally it worked with the legacy export option. Used these settings

export to png option

1
  • Turns out this also works for a .jpg. Thank you , this will make things a lot easier and saves me the effort of redoing everything.
    – Vincent
    May 11, 2021 at 11:08
3

Could be to do with anti-aliasing as well...

A workaround would be to use Pathfinder > Divide instead of a clipping mask. Will work for simple shapes like this, but if your artwork is a lot more complex it might need a more methodical pathfinder approach.

Because you're left with just the shapes that make up the graphic and nothing more (ie, no background colours inside clipping masks), there are no leftover artefacts or faint lines to mess things up.

Select all and click Pathfinder > Divide: Select all and click Pathfinder > Divide

Remove the bits you don't need:

enter image description here

3
  • 1
    Unfortunately, my artwork is complex enough that this not an option by a long shot. Thanks for chipping in, though!
    – Vincent
    Jan 27, 2016 at 14:13
  • Bummer - got a jpeg or screenshot you can share, even just a portion to see the complexity?
    – dannyrus
    Jan 27, 2016 at 15:47
  • The last image in my Q is a detail of the artwork I'm referring to. It looks simple now, but it used to be some twenty stacked stars being clipped to fit into a hexagon. See this image for example.
    – Vincent
    Jan 27, 2016 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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