通过在iPhone中命名约定加载高分辨率图像的逻辑 [英] loading logic of high resolution images by naming convention in iphone
问题描述
根据Apple的高分辨率图片命名约定
According to Apple's naming convention for high resolution images
当我们仅提供name.png时,iphone 3和iphone 4将显示它.
When we provide just name.png, iphone 3 and iphone 4 will display it.
当我们还提供比name.png分辨率更高的name@2x.png时,这次iphone3将显示name.png,而iphone 4将显示name@2x.png.
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.
这是我的问题
如果我们仅提供name@2x.png怎么办?好的,iphone 4将显示它.
Here is my question
what if we only provide name@2x.png? Ok, iphone 4 will display it.
iphone 3可以显示此图像吗?
Can iphone 3 display this image?
先谢谢您.
推荐答案
不,不能.非视网膜设备将找不到图像并按比例缩小图像.
我刚刚测试了这一点,很明显,在iOS 5上,Retterdesdialogs是正确的,发现了.我不确定何时引入此方法,我不相信总是如此,因为我过去曾尝试过这种方法.
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.
奇怪的是,让iOS通过命名约定找到图像的结果要比手动指定图像的结果差得多.我原本希望降级可以得到相同的结果,但似乎还差很多.
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.
这篇关于通过在iPhone中命名约定加载高分辨率图像的逻辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!