iOS pictures loaded into memory memory usage

Source: Internet
Author: User

My test results:

Picture occupies memory picture size . png File size

1MB 512*512 316KB

4MB 1024*1024 940KB

16MB 2048*2048 2.5MB

1.11MB 512*568

693KB 320*568 186KB

2.773MB 640*1136 664KB

6.240MB 960*1704 1.1MB

From the above test data can be concluded that:

IOS pictures loaded into memory occupy memory size for picture width * picture height ; The figure here is the byte;

( picture Width * picture height )/1024/1024 get MB

You can use the tool Instruments to view the image memory consumption

(COCOS2DX image resource-occupying memory algorithm is an integer multiple width of 2 * * For example: 960*1704 takes up memory is 1024*2048*4, not 960*1704*4)

iOS pictures loaded into memory memory usage

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.