2
我有一些代碼在那裏我抓住了屏幕的圖像,然後裁剪它基於一些邊界值:我抓住屏幕的圖像然後裁剪它後失去分辨率?
UIGraphicsBeginImageContextWithOptions(self.mainView.bounds.size, NO, 0.0);
[self.mainView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *comicImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIGraphicsBeginImageContextWithOptions(CGSizeMake(boundary.width, boundary.height), NO, 0.0);
[comicImage drawAtPoint:CGPointMake(-boundary.xMin, -boundary.yMin)];
comicImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
什麼我不知道的,我是生產低質量差的形象使用上述方法的分辨率?有沒有更好的方式去做這件事?
我有同樣的問題。採取截圖和裁剪它總是使質量差。找不到任何其他選項。 –