ios Retina iPad 应用程序设计中的 DPI

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11880341/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 19:39:45  来源:igfitidea点击:

DPI in Retina iPad app design

iosipadretina-displaydpippi

提问by Emphram Stavanger

I don't know if this belongs in StackOverflow or some other SE site, but here goes.

我不知道这是否属于 StackOverflow 或其他一些 SE 站点,但这里是。

I have a PSD design I have an iOS development team turning into a Retina iPad app. However, this design is made in the default 72 dpi.

我有一个 PSD 设计我有一个 iOS 开发团队正在转变为 Retina iPad 应用程序。但是,此设计是在默认 72 dpi 下进行的。

The development team is now saying the design should be 264 dpi (same as a Retina iPad) -- as well as a 132 dpi version for the non-Retina edition.

开发团队现在说设计应该是 264 dpi(与 Retina iPad 相同)——以及非 Retina 版本的 132 dpi 版本。

This confuses me, as I was under the impression that dpi just represents how many pixels go into an inch of output, and therefore would only matter in printing. The dpi of an iPad just represents the number of pixels for each inch of screen, and therefore doesn't according to my brain have anything to do with the dpi of the PSD. Especially since it already is in the 2048×1536 size required for Retina.

这让我很困惑,因为我的印象是 dpi 只代表一英寸输出中有多少像素,因此只在打印中很重要。iPad 的 dpi 仅表示每英寸屏幕的像素数,因此根据我的大脑与 PSD 的 dpi 没有任何关系。特别是因为它已经是 Retina 所需的 2048×1536 尺寸。

I told them this, but they insist, which has made me doubt my own infallibility.

我告诉他们这些,但他们坚持,这让我怀疑自己的无误性。

Who's in the right here? Does the dpi of the design file have anything to do with the dpi of the device? What would make an otherwise smart dev team think this?

右边是谁?设计文件的dpi和设备的dpi有关系吗?是什么让原本聪明的开发团队这么想?

回答by Adam B

The DPI of your Photoshop file does not matter.You can go into Photoshop and change the DPI to whatever you want. Going from non-Retina to Retina is "sort of" like doubling your DPI, however.

Photoshop 文件的 DPI 无关紧要。您可以进入 Photoshop 并将 DPI 更改为您想要的任何值。然而,从非 Retina 转到 Retina 就像将 DPI 加倍一样。

If you've already created a design assuming a 1024x768 resolution for the iPad, you will need to recreate the design to at 2048x1536. Where the concept of dpi comes into play is that the density of data should remain consistent at both retina and non-retina resolutions. You'll just need to recreate each bitmap-based element in your file at 4 times the resolution you originally had if you start with a non-retina file. It is sort of like going from 72 dpi to 144 dpi.

如果您已经为 iPad 创建了一个假设为 1024x768 分辨率的设计,则需要将设计重新创建为 2048x1536。dpi 概念发挥作用的地方在于,数据密度应在视网膜和非视网膜分辨率下保持一致。如果您从非视网膜文件开始,您只需要以原始分辨率的 4 倍重新创建文件中每个基于位图的元素。这有点像从 72 dpi 到 144 dpi。

回答by Teejay

You are right.

你是对的。

In a PSD, the DPI is not significant as it only serves to the system to determine how to print the file.

在 PSD 中,DPI 并不重要,因为它仅用于系统确定如何打印文件。

You can always change your PSD's DPI setting to make them happy :) That's definitely not significant.

您可以随时更改 PSD 的 DPI 设置以使它们满意 :)这绝对不重要。

If set to 264 DPI, a 2048*1536 printed image will be exactly iPad-sized.

如果设置为 264 DPI,则 2048*1536 的打印图像将与 iPad 大小完全相同。

And similarly a SD 1024*768 image set to 132 DPI will be same size.

同样,设置为 132 DPI 的 SD 1024*768 图像将具有相同的大小。

回答by user3340876

DPI/PPI makes no difference when you're working for a screen, it's the amount of pixels on the screen that matter. If you design for iPad at 2048x1536pxat 264ppior 72ppi, it's still 2048x1536pxin both cases. The only difference is if you full size the preview in photoshop.

当您为屏幕工作时,DPI/PPI 没有区别,重要的是屏幕上的像素数量。如果你在设计的iPad 2048x1536px264ppi72ppi,它仍然2048x1536px在这两种情况下。唯一的区别是如果您在 Photoshop 中放大预览。

PPI = Pixels Per Inch. If you're dealing with inches, PPI matters because its the density of that size. If you're measuring the document/canvas size by pixels, then the density would be "Pixels per Pixel" and that's just ridiculous.

PPI = 每英寸像素数。如果您要处理英寸,则 PPI 很重要,因为它是该尺寸的密度。如果您按像素测量文档/画布大小,那么密度将是“每像素像素数”,这太荒谬了。

Just make sure you're designing at accurate or higher pixels so they can be shrunken if needed for older iOS devices, low res Androids, desktop web, etc.

只要确保您以准确或更高的像素进行设计,以便在较旧的 iOS 设备、低分辨率 Android、桌面网络等需要时可以缩小它们。

回答by Shaun

Don't forget that an image, with a higher resolution than can be displayed at normal size, can improve the look of the graphic when it is zoomed into. Zooming happens all the time in iOS, especially on the iPhone, because the screen is too small to be really useful and it's just so easy to do.

不要忘记,分辨率高于以正常尺寸显示的图像,可以在放大时改善图形的外观。缩放在 iOS 中一直在发生,尤其是在 iPhone 上,因为屏幕太小而不能真正有用,而且它很容易做到。

回答by gfinale

DPI matters greatly. You can't just Hyman up dpi properly, you must develop at the highest dpi or even better, the proper dpi. For an example why, imagine you're creating a smooth, rounded edge using algorithms from an effect. The level of detail, as it fills in every change in the curve and selects each color gradient will be finer when the dpi is higher. A;though yu can pop in and change the dpi from 72 to 132 or 264 afterward, it doesn't apply the intelligence of each effect, yourself, etc, it simply fills based on what's there. That means you are defeating the entire purpose of the clearer high dpi screen and bringing it down to the quality of 72 dpi.

DPI 非常重要。你不能只是适当地提升 dpi,你必须以最高的 dpi 甚至更好的 dpi 进行开发。例如,假设您正在使用效果中的算法创建平滑、圆润的边缘。当 dpi 较高时,细节级别,因为它填充曲线中的每个变化并选择每个颜色渐变会更精细。A;虽然你可以弹出并在之后将 dpi 从 72 更改为 132 或 264,但它不会应用每个效果、您自己等的智能,它只是根据那里的内容进行填充。这意味着您违背了更清晰的高 dpi 屏幕的全部目的,并将其降低到 72 dpi 的质量。

回答by deleted_user

Even if you think your right the "dev" team wont listen to just do what they said, up the DPI to 144 and give them the images.

即使您认为您的权利,“开发”团队也不会听从他们所说的,将 DPI 提高到 144 并为他们提供图像。

Why make a big deal out of it when you can do this in 5 minutes. They are obviously wrong but why waste your time.

当您可以在 5 分钟内完成此操作时,为什么要大加利用呢?他们显然是错误的,但为什么要浪费你的时间。