开发者

How to programmatically take a low resolution snapshot using camera?

开发者 https://www.devze.com 2023-03-15 22:45 出处:网络
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 d

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消