All
I have a requirement to Upload a UIImage
taken from Photo Gallery or Photo taken from Camera,
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:chosenImage,@"chosenImage", nil];
UIImage* selectedImage = [userInfo objectForKey:@"chosenImage"]
NSData *imageData = UIImagePNGRepresentation(selectedImage);
}
I am using imageData to upload it on server, I want to know is there any way to reduce the memory size of the UIImage
without changing the quality. Please let me know.