0

let me explain first, when I take a picture with the camera, the picture is 1936x2592, what I do next is crop the image to 320x320 and put it in a UiImageView , this works perfectly , no problem here

What I want to do is to render the UiView with the UiImageView inside and other elements like tags, labels etc with a 800x800 resolution without having the image losing quality

I want to do this to upload the picture to facebook.

The code for render the UIView:

UIGraphicsBeginImageContextWithOptions(CGSizeMake(self.ImageView.bounds.size.width,self.ImageView.bounds.size.height), NO, 0.0f);

[self.View.layer renderInContext:UIGraphicsGetCurrentContext()];

UIImage *image = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();
Aman Aggarwal
  • 3,754
  • 1
  • 19
  • 26

0 Answers0