开发者

scale image of size 1600*1200

开发者 https://www.devze.com 2022-12-20 23:52 出处:网络
I am developing image size based iphone application. selecting two photos of size 1600*1200 from photo library andmerging of both to single image and save to same library. Again if i check the image s

I am developing image size based iphone application. selecting two photos of size 1600*1200 from photo library and merging of both to single image and save to same library. Again if i check the image size it shows 600* 800. How to get original size(1600*1200) of created New photo(600*800).

Thanks 开发者_开发百科in advance.


Check the UIImagePickerControllerDelegate Protocol Reference. The info NSDictionary of the imagePickerController:didFinishPickingMediaWithInfo: method contains the original image.


Solved as follows.

UIView *bgView = [[UIView alloc] initwithFrame:CGRectMake(0,0,1600,1200)];
UIGraphicsBeginImageContext(tempView.bounds.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage,self,nil,nil);

Thanks for all your support to solve the issue.

0

精彩评论

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

关注公众号