Cropping UIImage like camscanner

前端 未结 3 1840
你的背包
你的背包 2020-12-24 09:06

I am stuck in my application feature. I want cropping feature similar to Cam Scanner Cropping. The screens of CAM-SCANNER are: I have created similar crop view.

3条回答
  •  猫巷女王i
    2020-12-24 09:29

    Using the code given in Link : http://www.hive05.com/2008/11/crop-an-image-using-the-iphone-sdk/

    Instead of using CGRect and CGContextClipToRect Try using CGContextEOClip OR CGContextClosePath

    Though i havnt tried this... But i have tried drawing closed path using CGContextClosePath on TouchesBegan and TouchesMoved and TouchesEnd events.

    Hope this can give more insight to your problem...

提交回复
热议问题