[英]After rotation border of image is getting fuzzy ios
在開發基於攝影的應用程序時,我需要旋轉圖像。 但是旋轉圖像后,其邊界變得模糊。 我已經附上了這個截圖。
如您所見,第一個圖像看起來不錯,但是其他旋轉的圖像看起來不太好。
這是我的代碼.....
[img setBackgroundColor:[UIColor blackColor]];
[img setContentMode:UIViewContentModeScaleAspectFit];
[img.layer setBorderColor:[[UIColor whiteColor]CGColor]];
[img.layer setBorderWidth:3.0];
[img setTransform:CGAffineTransformMakeRotation(rotation*3.14/180)];
我已經使用了這個解決方案...
CGContextRotateCTM(context, radians);
[sourceImage drawInRect:rect];
但是,當圖像出現邊界時,如何使用此代碼。
請給您寶貴的意見.....
這是因為混疊效果。 搜索“抗鋸齒”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.