1 Answer
1

I'm not sure you want to crop, but instead you want to mask the image. This is pretty easy to do but you'll eventually find that it works for some images and not others. This is because you need to have the proper alpha channel in the image.

thanks for your replay but my problem is else.I have 4 different points like a trapezoid.User can also change these point and make shape is own style.Now I want to crop image like the same shape that user has create by draging point
–
Shinning RiverJan 3 '12 at 9:51

Can you take the 4 points, render them to a mask, and then use the above code?
–
Paul CezanneJan 3 '12 at 11:14

sorry I am new in IOS development.I am unable to understand your point. For example I have four point CGPoint firstPoint ,secondPoint,thirdPoint and fourthPoint of trapezoid then how I use the above code Thanks
–
Shinning RiverJan 3 '12 at 11:31