最新回答 / 沉睡一夏
剪切是對于原圖來說的坐標位置和大小,你可以嘗試改變坐標看看效果先,imageView 展示的時候選擇原尺寸大小顯示,ImageView的尺寸可以放大一些添加個背景顏色,這樣比較好的看出原因所在,只是提供個思路給你
2017-01-12
執行CGImageCreateWithImageInRect方法之后,需要執行CGImageRelease釋放CGImageRef
如下是官方文檔上的介紹注意點:
The resulting image retains a reference to the original image, which means you may release the original image after calling this function.
begin至end中間的繪制代碼沒有必要,拿到CGImageRef之后,直接[UIImage imageWithCGImage:imageRef]就能拿到圖片
如下是官方文檔上的介紹注意點:
The resulting image retains a reference to the original image, which means you may release the original image after calling this function.
begin至end中間的繪制代碼沒有必要,拿到CGImageRef之后,直接[UIImage imageWithCGImage:imageRef]就能拿到圖片
2016-12-17