Image size for UIImages, 1024 x 1024?

The apple docs indicate:

You should avoid creating UIImage objects that are larger than 1024 x 1024. In addition to the large amount of memory in such an image, you may encounter problems when using an image as a texture in OpenGL ES or when drawing an image on a view or layer. This size restriction does not apply if you perform code manipulations, such as resizing an image larger than 1024 x 1024 pixels by drawing it in a graphics context that supports bitmap graphics. In fact, you may need to resize the image this way (or split it into slightly smaller images) to bring it to one of your views.

I suppose this means that if we are working with non-square images, should we break them down into smaller images? Is there any specific documentation or explanation for this, or does anyone have any experience tips?

Thanks for reading.

+5
source share
1 answer

On pre-A5 iOS devices, the maximum OpenGL ES texture size was 2048x2048 (Apple's documentation is incorrect in this regard, saying 1024x1024). This means that you cannot have an image larger than in any dimension. Newer iOS devices (iPhone 4S, iPad 2, iPad 3) have a maximum texture size of 4096x4096.

, , , 2048 ( , 4096 ). , , .

UIView, CATiledLayer, , . 2048x2048, CATiledLayer ..

. , , 16,777,216 2048x2048 (4 RGBA). , .

+7

All Articles