의 손실 품질 나는 코드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