Callebe
Callebe

Reputation: 21

Drawing large images for ipad

I am developing an application for viewing images. I used the example of PhotoScroller Apple to implement this application. In my application I want to be able to draw on the image.

I had the idea to put a UIView on top with transparent background and draw the lines via touch events. This solution has become very slow because the generated images are very large, around 3700x2000 pixels.

I also tried a solution with the example of Apple GLPaint that uses OpenGL, but it has a size limitation of 2048x2048 pixels.

Anyone have any idea or example of how I implement this?

Upvotes: 2

Views: 272

Answers (1)

sergio
sergio

Reputation: 69047

I think you should try and tile your image.

One option is using CATiledLayer. Have a look at this short tutorial.

Or you could try and use CGContextDrawTiledImage to get your stuff done. Possibly this post from S.O. could help you getting started.

Upvotes: 2

Related Questions