Image Drawing on UIView

Posted by user1180261 on Stack Overflow See other posts from Stack Overflow or by user1180261
Published on 2012-11-15T10:57:51Z Indexed on 2012/11/15 11:00 UTC
Read the original article Hit count: 391

Filed under:

I'm trying to create an application where I can draw a lot of pictures at a specific point (determined for each image) on one view. I have a coordinates where I need draw a picture, width and height of it For example:

I have 2 billion jpeg's images. for each images I have a specific origin point and size. In 1 second I need draw on view 20-50 images in specific point.

I have already tryid solve that in the next way:

UIGraphicsBeginImageContextWithOptions(self.previewScreen.bounds.size, YES, 0);
[self.previewScreen.image drawAtPoint:CGPointMake(0, 0)];
[image drawAtPoint:CGPointMake(nRect.left, nRect.top)];
UIImage *imagew = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.previewScreen setImage:imagew];

but in this solution I have a very big latency with displaying images and big CPU usage

WBR

Maxim Tartachnik

© Stack Overflow or respective owner

Related posts about ios