snippet for creating thumbnail:
1 2 3 4 5 6 |
UIImage* originalImage =[info objectForKey:UIImagePickerControllerOriginalImage]; CGSize destinationSize = self.lastPhoto.frame.size; UIGraphicsBeginImageContext(destinationSize); [originalImage drawInRect:CGRectMake(0,0,destinationSize.width,destinationSize.height)]; UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); |