画像を切り抜くだけです。しかし、保存された画質をトリミングした後は、元の画像とは異なります。
サーバーにアップロードするとき。サーバー管理者はあなたの画像が圧縮されていると言っています.jpg
トリミングされた画像の品質を向上させる方法はありますか?
私は正しくやっていますか?
ありがとう
コード:
CGRect rect = [mImageView bounds];
UIGraphicsBeginImageContextWithOptions(rect.size,YES,0.0f);
CGContextRef context = UIGraphicsGetCurrentContext();
[self.view.layer renderInContext:context];
UIImage *capturedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(capturedImage, nil, nil, nil);///save image in phone