PPI和DPI原來(lái)是一回事。

DPI如何換算PPI,這個(gè)問(wèn)題讓我糾結(jié)了好幾天了,以前做UI一直用72PPI的,再換了蘋(píng)果電腦R屏以后,突然發(fā)現(xiàn)PS的預(yù)置模版分辨率不是72PPI了!


9DB0152D-141C-48BC-9A2C-FE2E0C0E82AD.png

workflow-ios-sizes-in-points.png

一時(shí)之間搞不明白了。于是開(kāi)始各種惡補(bǔ),幾天下來(lái),被各種顯示器的密度,各種換算方式一下子就整暈了。帶著疑問(wèn)去跟人討論,沒(méi)人說(shuō)的清楚,就說(shuō)按72做沒(méi)錯(cuò) 至于為啥也說(shuō)不清楚,甚至有人直接拋個(gè)白眼給我,讓我先把PS弄熟練了再來(lái)問(wèn)問(wèn)題...秉著知其然亦需知其所以然的念頭 我執(zhí)著的找啊找,找到了下面引用的文章,好了。現(xiàn)在終于不糾結(jié)了,做UI的話PPI和DPI原來(lái)是一回事。用72PPI也好,用更高的分辨率也好,其實(shí)都一樣。機(jī)器不太慢的話,我還是建議用大于150PPI的分辨率做,因?yàn)橛袝r(shí)候,項(xiàng)目上線后很久,甲方會(huì)找到你,說(shuō)我要印宣傳冊(cè)或打印啥的,讓你提供圖標(biāo)和界面截圖給他,那時(shí)難道你重新畫(huà)嗎?不過(guò)這樣也會(huì)導(dǎo)致文件過(guò)大,請(qǐng)慎重對(duì)待。

Pixels per inch is just a tag

Image pixel density for web and app design is often seen as a confusing topic. I’m not sure why this is — when stripped back to the bare essentials, the reality is far less complex than you might think.

Bitmap images are two dimensional grids of pixels, with a width and a height. They often also contain meta data, which may include pixel density. Pixel density is often described as pixels pixels per inch (PPI) or dots per inch (DPI).
The two names, PPI and DPI, mean essentially the same thing — the number of pixels contained within a vertical or horizontal inch. 300PPI means that there’s 300 pixels contained within each one inch row. A one inch by one inch square in a 300PPI image contains 90,000 pixels, because it is a 300 × 300 pixel square. Most displays have a fixed resolution grid, so their pixel density can’t change. A Retina iPad Air display is 264PPI, because there’s 264 elements per inch in the display that can each only ever represent one pixel.
The pixel density stored in image files is different. It’s just meta data that’s saved alongside the image data. It can be changed at any time without affecting the image data at all. It should be considered a relic from the printing industry, because in general, web and app development display all images so that one pixel in the image equals one on screen, ignoring the embedded pixel density information.
Pixels per inch (PPI) vs dots per inch (DPI) vs lines per inch (LPI)

Purists will probably use PPI to describe on screen pixel density and DPI to describe print density, but I think this is a battle that’s drawing to a close. Apple, Microsoft and Google all seem to prefer using DPI in their literature. Curiously, Apple’s iPhone 4S and iPad specs describe their displays using PPI.
For screen design, PPI and DPI are interchangeable.
For print design, DPI only exists to indicate the final size the image might be printed. It’s sometimes used to generate thumbnail images to help performance in layout apps. It can also be used to indicate optimal print size — InDesign, Xpress and others treat 100% image size as meaning “the physical size you’ve used the image in your layout matches the pixel density tag contained in the image”. That’s a great feature. If the images are set up correctly, you know how large you can make images without risking pixelation. It’s still just a tag associated with the image. A handy tag, but a tag nonetheless.
Lines per inch (LPI) is a printing-specific term that describes how close together the halftone lines are. Not all printing is 300DPI — coarser line screens, like those used for newspaper and large format printing (billboards etc), mean lower pixel density images can be used.
The history of 72PPI

The original Mac, the Macintosh 128K, featured a 512 × 342 pixel, 72PPI black and white display. Because of this, OS X has considered 72PPI to be baseline where one image pixel equals one display pixel, even though most Mac displays are far higher density than 72PPI.
OS X’s Preview can view one image pixel as one display pixel, or it can scale using the PPI tag within the file.

It’s just metadata

If you’d like to set up your Retina iPad Photoshop documents at 264PPI, be my guest. You could also set them up at 72PPI. It really doesn’t matter, as long as the final result is images with the correct pixel dimensions.
However, if you plan to use Photoshop and different pixel densities for each document, dragging layers and copying layer styles between documents scales layer styles — dragging a layer from a 326PPI Retina iPhone document to a 264PPI Retina iPad document will mean all layer styles get scaled by 20% (then rounded to the nearest integer).
And that’s probably not what you want. Also, OS X’s Preview will display 72PPI images at the exact size, no matter how you have it set up.
It is for these reasons I assign 72PPI to all my design documents, and I recommend you do the same. To change the pixel density of your Photoshop document without resizing the image data, open the Image Size dialogue, uncheck Resize Image and type in the desired pixel density.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容