I am developing a fax client that is able to take snapshots. It communicates to the server via web service calls. Is there a way to reduce the image resolution so that we can have faster uploads and downloads? Right now the user has to wait a good 50 seco开发者_JAVA百科nds for anything to happen.
This is the code I am using presently:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo {
[image setImage:img];
[[picker parentViewController] dismissModalViewControllerAnimated:YES];
}
You have to resize the image the ImagePickerController gives you before you send it. You can find many informations and UIImage categories on this article : http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/
精彩评论