开发者

UIGetScreenImage() crops on iPhone 4

开发者 https://www.devze.com 2023-03-11 20:23 出处:网络
UIGetScreenImage() works fine on my app on iPhone 3 (3G, GS) but on iPhone 4 it seems to get only a cropped area (upper left). I use UIGetScreenImage() to capture a frame from the camera.

UIGetScreenImage() works fine on my app on iPhone 3 (3G, GS) but on iPhone 4 it seems to get only a cropped area (upper left). I use UIGetScreenImage() to capture a frame from the camera.

Here开发者_运维技巧 is some code

CGImageRef iref =  UIGetScreenImage();
UIImage *tmpImage = [[UIImage alloc] initWithCGImage:iref];

And afterwards I save it to photo album successfully. Any ideas?


its because of the double resolution of the retina screen, you are getting a quarter of the screen I imagine.

Read this, explains exactly what you have to do :)

http://developer.apple.com/library/ios/#qa/qa1703/_index.html

0

精彩评论

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