0
我見過很多例子,其中有一些新的UIImage通過輸入UIImage進行修改。它看起來像:在UIGraphicsContext中修改原始UIImage
- (UIImage *)imageByDrawingCircleOnImage:(UIImage *)image
{
// begin a graphics context of sufficient size
UIGraphicsBeginImageContext(image.size);
// draw original image into the context
[image drawAtPoint:CGPointZero];
// get the context for CoreGraphics
CGContextRef ctx = UIGraphicsGetCurrentContext();
// draw there
我有類似的問題,但我真的想修改輸入圖像。我想這會更快,因爲我不會每次都繪製原始圖像。但我找不到任何樣品。我如何獲得原始圖像的圖像上下文,它已經繪製出來了?