0

I was curious to know the best practice when saving images for my iPhone app project.

I know I have to make two images one for retina @ 326dpi and then one at 163dpi.

A lot of tuts I've read seem to save images as PNG regardless of if there's transparency - is that normal best practice? I would normally save as jpg if there is no transparency but keen to know what others do.

Finally - In Photoshop would you opt for 'Save as' or 'Save for Web'? I notice that on save for web - when you bring the image back into Photoshop and look at the dpi it is now set to 72dpi.

Sorry I'm not being too vague - just keen to hear your best practice approach.

Thanks

Shell

4

1 回答 1

1

DPI 并不重要。重要的是每个维度的总像素。如果图像中的 DPI 值不正确,我见过 Apple 的代码错误地设置图像比例的情况。

非视网膜应设置为 72 DPI,视网膜应设置为 144 DPI。我不知道你从哪里获得 326 和 163 dpi。

Apple 的文档说 iOS 针对 PNG 进行了优化,并且优先使用它们而不是 JPEG。Xcode 对 PNG 进行适度压缩,但加载速度仍然非常快。JPEG 解压有点慢,所以使用 JPEG 可能会引入延迟。

话虽如此,我们有一个客户的应用程序有大量图像,为了减小文件大小,我们将它们保存为 JPEG,在较新的硬件(iPhone 4s 及更高版本)上,它们似乎加载速度很快。

于 2013-10-19T19:41:18.223 回答