的失去质量,我尝试使用擦除图像下面的代码drawInRect:图像分辨率
CGColorRef strokeColor = [UIColor whiteColor].CGColor;
UIGraphicsBeginImageContext(imgForeground.frame.size);
CGContextRef context = UIGraphicsGetCurrentContext();
[imgForeground.image drawInRect:CGRectMake(0, 0, imgForeground.frame.size.width, imgForeground.frame.size.height)];
CGContextSetLineCap(context, kCGLineCapRound);
CGContextSetLineWidth(context, 10);
CGContextSetStrokeColorWithColor(context, strokeColor);
CGContextSetBlendMode(context, kCGBlendModeClear);
CGContextBeginPath(context);
CGContextMoveToPoint(context, lastPoint.x, lastPoint.y);
CGContextAddLineToPoint(context, currentPoint.x, currentPoint.y);
CGContextStrokePath(context);
imgForeground.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
但我只是看看图片失去其分辨率因drawInRect。
上传“之前”和“之后”屏幕显示图像会有很大的帮助,包括视觉效果的问题。 – dasblinkenlight
上传图片请参照 –
目前尚不清楚“图像分辨率质量下降”的含义。也许你可以尝试更具体些。 – ipmcc