简体   繁体   English

图标分辨率:像素与DPI

[英]Icon resolutions: Pixels vs DPI

When I try to do some research on making icons for Windows, and what size/resolution images I should leave in my .ico files before saving, there's too much weird information. 当我尝试做一些关于为Windows制作图标的研究,以及在保存之前我应该​​在我的.ico文件中留下什么尺寸/分辨率的图像,这里有太多奇怪的信息。

Some say put 16x16, 24x24, 32x32, 48x48 ... and so on in 96 DPI. 有人说在96 DPI中放16x16,24x24,32x32,48x48 ......等等。

This is what irks me, and I feel it doesn't make any sense. 这让我感到烦恼,我觉得这没有任何意义。

Isn't 1 pixel = 1 pixel? 不是1像素= 1像素?

Why do they insist on mixing DPI into this? 为什么他们坚持将DPI混合到这个?

What is always true is that 1 pixel = 1 pixel . 总是如此, 1 pixel = 1 pixel What does change is how big that pixel is one various displays that have different screen densities. 改变的是,具有不同屏幕密度的各种显示器的像素有多大。 That is what DPI describes - number of dots (pixels) per inch. 这就是DPI所描述的 - 每英寸的点数(像素)。 But using DPI in context of image size only makes sense when you use it in combination with inches (centimeters). 但是在图像尺寸的上下文中使用DPI只有在与英寸(厘米)组合使用时才有意义。 For instance "create image 10x10 inches at 300 DPI" and from that statement you can calculate that image has to be 3000x3000 pixels in size. 例如“在300 DPI下创建10x10英寸的图像”,从该语句中您可以计算出图像的大小必须为3000x3000像素。

As far as Windows is concerned what does count is font scaling setting that can be set from 100% to 200% 就Windows而言,计数是字体缩放设置,可以设置为100%到200%

So when you are creating your icons make sure that you have at least 1x and 2x dimensions. 因此,在创建图标时,请确保至少具有1x和2x尺寸。 If the icon has to be 16x16 pix under normal resolution, that means that you would also create 32x32 pix icon. 如果图标在正常分辨率下必须是16x16像素,这意味着您还将创建32x32像素图标。 Other commonly used scaling are 125% and 150%, so it would be good idea to provide icon for those sizes too. 其他常用的缩放比例分别为125%和150%,因此最好也为这些尺寸提供图标。

You can freely ignore statements like "Make the icon x pixels wide and x pixels high in x DPI" because those people have no clue what they are talking about. 您可以自由地忽略诸如“使图像x像素宽x x像素高x DPI”之类的语句,因为这些人不知道他们在说什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM