I am trying to resize an image with the maximum of 1000px width but the "ratio" of the original image resolution needs to stay the same. i.e. 1000x1300 or 1000x1600 etc
What changes to I need to make to the code below?
- (void)setImageAndConvertToThumb:(UIImage *)image {
//image
UIImage *sizedImg = [image scaleWithMaxSize:CGSizeMake(1000, 1000) quality:kCGInterpolationHigh];
NSData *data = UIImagePNGRepresentation(sizedImg);
self.image = data;
}