Reputation: 14571
I'm trying to come up with some kind of standard to determine a maximum zoom setting for a given imageview (using a UIScrollView). In the apple docs it says that you should not initialize a uiimage object that is anymore than 1024 x 1024 into memory. Does it make sense to also apply this rule to a zoomed image, like for instance would it be best for me to make sure that the longest side of my image isn't zoomed any larger than x1024? Does anyone have any insight on this, I don't know too much about the memory requirements of ios and haven't been able to find anything from Apple (aside from the uimage requirements I stated).
Upvotes: 0
Views: 189
Reputation: 15673
You are really talking about two different things. Loading an image into memory takes up memory space so a picture that is 1024 x 1024 when loaded will always occupy that space in memory.
Zoom is something totally different. When you zoom, you arent adding any extra data to the image, you are simply taking the loaded image (lets say 1024 x 1024) and 'stretching' the bits across the screen.
The amount of data being stored doesnt change, the renderer just does different things with it i.e strectching out the pixels. With this being the case, I can only assume that you can set the max zoom to anything you want, but obviously the more you zoom in the worse the image will look.
Upvotes: 1