loading logic of high resolution images by naming convention in iphone

こ雲淡風輕ζ 提交于 2019-12-07 18:19:48

问题


According to Apple's naming convention for high resolution images

When we provide just name.png, iphone 3 and iphone 4 will display it.

When we provide also name@2x.png which has higher resolution than name.png, this time iphone3 will display name.png and iphone 4 will display name@2x.png.

Here is my question
what if we only provide name@2x.png? Ok, iphone 4 will display it.

Can iphone 3 display this image?

Thank you in advance..


回答1:


No, it can't. Non-retina devices will not find the image and scale it down.

Edit: I've just tested this and apparently on iOS 5, Retterdesdialogs is correct, it is found. I'm not sure when this was introduced, I don't believe it was always the case as I've tried this in the past.

Curiously, letting iOS find the image via naming convention gives much poorer results than if you specify the image manually. I would have expected the downscaling to give identical results, but it seems quite a bit worse.




回答2:


iPhone 3 can display this image but in low quality because overall pixels get scaled to half size.



来源:https://stackoverflow.com/questions/7806616/loading-logic-of-high-resolution-images-by-naming-convention-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!