Convert regular PNG to iPhone Optimized format

I have an iPhone app that downloads images from the Internet and saves them for display later.

The user can select the images to view from the UITableView, in the table view there are custom cells that display thumbnails of the original images in different sizes.

When a large image is loaded first, it is scaled to the thumbnail size, and the thumbnail is saved using the UIImagePNGR view.

What I would like to do is save the thumbnail in the optimized PNG format for the iPhone. How can i do this? does this happen magically, just loading the original large image into memory and storing it? Do I have to do further thumbnail processing before saving?

+1
source share
3 answers

Most likely, the UIImagePNGR view does not create images, since they are inappropriate PNGs and cannot be read by anything else. If they API generate PNGs that cannot be read, I think he will document this, and anyone who downloads PNG from the phone will notice that they do not work.

Optimization is useful, but most optimized PNGs are part of the user interface, where optimization is performed as part of the build process. Most likely, the cost of performing the optimization will compensate for any benefits derived from it.

+2
source

, , RGB565, , CGGraphicsContext, , UI, .

, , . - OpenGL OpenGL .

0

" PNG", - .

does not affect the rendering speed in general , and the download speed dictated by the file size is larger than the file format .

So just save it in a format that will give you the smallest files. If you do not use transparency, it may be JPEG.

If you need transparency and you can spend more CPU time saving images, include pngquant in your program (it is under BSD-like license) and compress these PNGs to an 8-bit palette.

0
source

All Articles