cocoa touch - iPhone. How to change individual pixels of big CGImage inplace? -


I use UIScrollView, which zooms and scrolls UIImageView, which includes UIImage, which is pixel from CGI Take it. CGImage size can be around 5000x2000 pixels 1) Is this a perfect way to zoom and scroll larger image?

Some logic can be changed from time to time in some areas (CIIMS) 2) I use IndiVile pixels (full image entertainment) without using heavy processor in place in CGI image?

My solution:

  • I have a larger image in XRGB format Creating CGBitmapContext for archiving
  • Subject UIView for the Override Dracoure: which represents my image

Updated periodically:

  • Update some of the rectangles
  • [setNeedsDisplayInRect: rect]

[drawRect: rect] in:

  CGContextRef G = UIGraphicsGetCurrentContext ( ); CGImageRef imgAll = CGBitmapContextCreateImage (m_BmpContext); CGImageRef imgRect = CGImageCreateWithImageInRect (IMGAL, Rect); CGContextDrawImage (G, Rect, IMGRACT); CGImageRelease (IMGRACT); CGImageRelease (IMGL);  

And it works fine for me


Comments