Thursday 15 May 2014

ios - UIImage resize performance and quality issue -


I am working with UIImage and everyone has to deal with retina and non-retina display adaptability. As I know, retina displays require dual pixels.

I am thinking that can I use a larger image with the same width / height ratio, just shorten it to optimize all devices?

For example, I've made an original image with the size of 200 * 200 pixels, now I want to use it in the application as 20 * 20 pixels and 80 * 80 pixels (two conditions) . Then I get four copies like img2020.png, img2020@2x.png, img 8080.png and img 8080@2x.png

So if I want to use it in three conditions with the difference size, then my Can I use the UIImage-sized function to do it to store up to 6 copies? I have tried a bit, but it can not understand quality and performance.

Any thoughts? Thank you very much :)

All original APIs you think image.png And image@2x.png , so sometimes it can be difficult to use only one image and it can be scaled on the basis of retina / non-retina, non-retina device But using retina graphics is a more widespread use of the resources of these devices, causing the battery drain and, of course, augues You have many images, it will reduce the performance of your application. In other words, due to the use of a double set of images and you should use it to make a big image smaller .

No comments:

Post a Comment