8

How can I get the outline of the image as a CGPath?

For example, how can I get the outline of the Google logo (which has an transparent background). This might be slightly complex case. So a solution to handle less complex scenarios will work (for me) as well.

New Google Logo

Mustafa
  • 20,504
  • 42
  • 146
  • 209

1 Answers1

2

I found this a while ago and used it for something I was working on.

PoketSVG is a library that converts scalable vector graphics to CGPaths and UIBezierPaths. Maybe this will help you? Its on GitHub so you can also have a look at what they're doing at the very least if the library itself isn't useful to you.

good luck!

EDIT: when I used the library, I used it to get outlines of vector graphics. Mind you they were solid shapes, rectangles and squares. Again, I think its a good place to start.

user3339357
  • 292
  • 3
  • 16