在开发基于摄影的应用程序时,我需要旋转图像。但是在旋转图像后,它的边框变得模糊。我附上了这个屏幕截图..
正如您所看到的,第一张图片看起来不错,但其他旋转的图像效果不佳。
这是我的代码.....
[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];
但是当图像有边框时如何使用此代码。
请给出您宝贵的回应.....