Batch optimization of PNGs for iphone/ipad display as xcode does

后端 未结 7 1009

I\'m working on a magazine viewer for ipad and I\'m struggling with the performance.

I figured out that the most expensive part of displaying the pngs is the loading

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 03:32

    I think I've found a good article about png optimization for iphone: http://iphonedevelopment.blogspot.com/2008/10/iphone-optimized-pngs.html

    It seams that xcode uses this command: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/iphoneos-optimize

    It appears that the above command uses a modified version of pngcrush to optimize pngs and transform the color channels: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -iphone -f 0 orig.png optimized.png

    And the optimization is really helpful. I've got 5 time faster image loading!

提交回复
热议问题