对像素和点感到困惑

发布于 2024-11-18 01:47:30 字数 515 浏览 5 评论 0原文

我知道这个问题可能与设计有关,但由于它是编程应用程序的一个非常重要的部分,在具有不同屏幕的多个设备上看起来不错,所以我尝试在这里询问。我在这里浏览了与点和像素相关的其他问题,但是 我找到的只是公式,这很好,但我不明白。

从这里:维基百科 - 点

(1 点 = 1⁄72 英寸 = 25.4⁄72 毫米 = 0.3527毫米)

所以开始: 点只是一种测量方式,就像其他任何东西一样,对吗?那么 1 点定义为 1/72 英寸,是一个常数吗?那么为什么维基百科文章说 1/72 英寸等于 0.3527 毫米呢?当我除以 1/72 英寸,然后将结果乘以 2.54 得到厘米时,我得到 0.0352775?

如果有人可以“指导”我将像素转换为点并再次转换回来,我也将不胜感激。我对积分感到很不舒服。

抱歉问了愚蠢的问题。

I know this question may relate to design, but since it is a pretty important part of programming applications that looks good on multiple devices with different screen I try asking here. I have browsed the other questions here which relates to points and pixels, but
all I find is the formula, which is OK but I do not understand it.

From here: Wikipedia - points

(1 point = 1⁄72 inches = 25.4⁄72 mm =
0.3527 mm)

So to start:
A point is just a way of measuring, just like anything else right? So 1 point is defined to be 1/72 inch, a constant? So why does the wikipedia article say that 1/72 inch equals 0.3527 mm? When I divide 1/72 inch and then multiple the result with 2.54 to get centimeters I get 0.0352775?

I would also appriciate if someone could "guide" me through convertion of pixels to points and back again. I feel pretty uncomfortable with points.

Sorry for asking stupid question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

岁吢 2024-11-25 01:47:30

您上面使用的“点”的定义基于点的标准打印定义,其中打印介质为每英寸 72 点。设备上的点到像素转换取决于设备的 PPI。

在 72 ppi 显示屏上,1 点 = 1 像素。这就是为什么每英寸点数有时也称为像素密度。

像素到点:
点 = (像素 * 72) / ppi

点到像素:
Pixels = (points * ppi) / 72

Android SDK 提供了获取设备 PPI 的方法来进行这些计算。

我不知道黑莓是否这样做。

The definition of "point" you're using above is based on the standard print definition of point, where print media is 72 points-per-inch. Point-to-pixel conversion on a device depends on the PPI of the device.

On a 72 ppi display, 1 point = 1 pixel. That's why points-per-inch is also sometimes referred to as pixel density.

Pixels to Points:
points = (pixels * 72) / ppi

Points to Pixels:
pixels = (points * ppi) / 72

The Android SDK provides methods of obtaining the PPI of the device for making these calculations.

I have no idea if BlackBerry does.

岁吢 2024-11-25 01:47:30

仔细阅读以下内容:


1 点 = 1⁄72 英寸

1 英寸 = 2.54 厘米 --> 1点=2.54cm/72=0.03527cm

1cm=10mm --> 0.03527 厘米 = 0.3527 毫米 // 您错过了

1 = 0.3527 毫米

Read followings carefully:


1 point = 1⁄72 inches

1 inch = 2.54cm --> 1 point= 2.54 cm/72 = 0.03527cm

1 cm = 10 mm --> 0.03527 cm = 0.3527 mm // You missed this

1 point = 0.3527 mm

吾性傲以野 2024-11-25 01:47:30

首先,0.3725 mm = 0.03725 cm

毫 = 1/1000,厘 = 1/100。我希望这有助于消除您数学上的差异。

像素/点/英寸的关系是可变的,具体取决于您的技术。当今市场上的大多数显示器每线性英寸使用 72 个物理像素。这在视频中可能会有所不同,因为它们的某些分辨率的像素长宽比为 0.9:1,而不是 1:1,但这并不真正适用于这种情况。

大多数操作系统显示他们认为的每英寸 96 点(或点),但这在操作系统之间有所不同,显然屏幕尺寸很重要。如果您运行的是 600x800 分辨率的 20 英寸显示屏,则每英寸点数会更大。

这意味着 72 点可能等于也可能不等于 1 英寸。这取决于屏幕尺寸、DPI 设置以及分辨率屏幕运行

于:http://www.emdpi.com/screendpi.html

我知道这并不能解决所有问题,但希望它能列出您正在处理的变量。

First, 0.3725 mm = 0.03725 cm

milli = 1/1000th, centi = 1/100th. I hope that helps clear up the differences in your math.

The pixels/points/inches relationship is a variable one depending on your technology. Most displays on the market today use 72 physical pixels in every linear inch. That can vary some in video, as they have some resolutions that have a 0.9:1 pixel aspect ratio, and not a 1:1, but that doesn't really apply in this context.

Most operating systems display what they believe to be 96 dots per inch (or points), but that differs between OS's, and obviously screen size matters. If you're running a 20" display at 600x800 resolution, your dots per inch are going to be larger.

That means 72 dots may or may not equal 1 inch. It depends on the screen size, the DPI setting, and the resolution the screen is running at.

A fair explanation is at: http://www.emdpi.com/screendpi.html

I know that doesn't clear everything up, but hopefully it lays out the variables you're dealing with.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文