To store images from UIGetScreenImage() in NSMutable Array

Posted by sujyanarayan on Stack Overflow See other posts from Stack Overflow or by sujyanarayan
Published on 2010-03-30T05:11:50Z Indexed on 2010/03/30 5:13 UTC
Read the original article Hit count: 397

Filed under:
|

Hi, I'm getting images from UIGetScreenImage() and storing directly in mutable array like:-

image = [UIImage imageWithScreenContents]; [array addObject:image]; [image release];

I've set this code in timer so I cant use UIImagePNGRepresentation() to store as NSData as it reduces the performance. I want to use this array directly after sometime i.e after capturing 1000 images in 100 seconds. When I use the code below:-

UIImage *im = [[UIImage alloc] init]; im = [array objectAtIndex:i]; UIImageWriteToSavedPhotosAlbum(im, nil, nil, nil);

the application crashes. And I dont want to use UIImagePNG or JPGRepresentation() in timer as it reduces performance.

My problem is how to use this array so that it is converted into image. If anybody has idea related to it please share with me. Thanks in Advance.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone