title: Get UIBezierpath from masking an UIImage
body: <p>How can I get <code>UIBezierpath</code> from <code>UIImage</code> like this..</p>
  
  <p><img src="https://i.stack.imgur.com/0Y56m.png" alt="enter image description here"></p>
  
  <p>I do not want full square path, Just want that path as shown in red border from UIImage..</p>
  
  <p>I had gone through <a href="https://stackoverflow.com/questions/7071815/ios-mask-a-uiimage-using-uibezierpath">Link 1</a> and <a href="https://stackoverflow.com/questions/2776747/masking-a-uiimage">Link 2</a> but can't got success..</p>
  
  <p>I had done following code to get masking path..</p>
  
  <pre><code>CAShapeLayer *maskLayer = [CAShapeLayer layer];
  maskLayer.frame = imgView.frame;
  UIBezierPath *roundedPath = [UIBezierPath bezierPathWithRoundedRect:maskLayer.bounds byRoundingCorners:UIRectCornerAllCorners cornerRadii:CGSizeMake(50.f, 50.f)]; 
  </code></pre>
  
  <p>Basically I want to get <code>UIBezierpath</code> that follows the shape of alphabets like A,B.. etc.</p>
  
  <p>Please tell me is this possible or not to get this type of path??</p>
  
  <p>Thanks in advance..</p>