PNG batch optimization to display iphone / ipad as xcode

I am working on viewing the log for ipad and I am struggling with performance.

I realized that the most expensive part of displaying png is the loading process. I know that xcode is able to optimize png during build, and such images load much faster. But I canโ€™t include all the images in the assembly, because it will be huge.

Do you know how to optimize arbitrary png without including it in the build process?

Do you know what is the best format for iphone? I think pngs should use the RGB-8888 color scheme, but I'm not sure what else is important.

Perhaps you know the exact parameters for imagemagick?

+5
source share
7 answers

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

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

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

And optimization is really useful. I have 5 times faster loading images!

+7
source

, , ImageOptim, PNG, Xcode. pngcrush PNG . , - . ImageOptim drag-and-drop .

+5

Pngcrush PNG. . , , PNG JPG . , .

+2

, Xcode ( Xcode ).

PNG - PNG8 + - - pngquant ( GUI).

, RGBA BGRA - , , AdvanceCOMP XCode โ€‹โ€‹ PNG iOS.

+2

pngnq, pngquant, pngcrush, optipng ..

PNG pngquant, pngnq pngcrush

Dir.glob("**/*.png").each do |file|
  ['pngnq -e .png -f', 'pngquant -f -speed 1 -ext .png', 'pngcrush'].each do |command|
    puts "#{command} #{file}"
    `#{command} #{file}`
  end
end

: http://l4u.github.com/blog/2012/04/02/optimizing-file-sizes-of-png-images/

+2

, pngnq, , , .

+1

http://texturepacker.com

PNG, , . RGBA4444 RGB565, .

PVR , (, iOS, Android)

And it also supports image scaling for low resolution devices.

0
source

All Articles