【发布时间】:2015-07-09 22:14:49
【问题描述】:
我见过很多例子,他们通过输入 UIImage 的修改获得新的 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
我有类似的问题,但我真的想修改输入图像。我想它会工作得更快,因为我不会每次都绘制原始图像。但我找不到它的任何样本。如何获取已绘制的原始图像的图像上下文?
【问题讨论】:
标签: ios uiimage uikit core-graphics