Reduce the size of the IPA package by compressing the PNG Image

Source: Internet
Author: User

1. After selecting the targets-> build settings-> compress PNG files option, during xcode packaging,
It also changes the image format and compresses the image.
2. If compress PNG filest = Yes, the image processed by the pressure graph software will become larger after xcode processing.

Therefore, to compress the size of the IPA package, two points are required.
1. Set compress PNG filest to No.
2. Manually compress all or most of the images with the stress Graph Software.

The idea I started was to compress a large image, so that a small image is not compressed to ensure the display quality.
But the real girl proved that this was not feasible:
1. If compress PNG filest is set to no,
Xcode will not compress images without pressure, which will offset the reduced size of the manually pressed images.
2. If compress PNG filest is set to Yes
After being processed by xcode, the manually pressed graph becomes larger.

Therefore, the final idea is that only compress PNG filest is set to yes, to ensure the display quality, only a few commonly used images are not manually pressed,
For example, the background image of the nav bar and the general background image of the view. Most other images are compressed by the stress Graph Software.

After the above processing, IPA packages were reduced from 14.5 to 10.9. Reduced by 3.4 m, that is, 23.4%. It is still objective.

The above IPA has not been submitted to the app store. I wonder if there will be any problems.

Recommended pressure Graph Software: imageoptim, which has several built-in pressure graph tools. It selects the smallest pressure graph as the final output and supports dragging into the directory to compress all the images in the directory.

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.