转换px为mm [英] Convert px to mm
问题描述
我正在在线创建名片制造商,到目前为止,直到我开始进行名片渲染为止,一切都很容易.在我的HTML文档中,我有:
width = 517px,等于90mm
高度= 287像素,等于50毫米
根据Photoshop 90mm -> 255px ,所以我需要以某种方式将 517px 转换为 255px ./p>
经过一些谷歌搜索的最佳解决方案后,到目前为止我想到的是(517/5.7)* 3
,这使我获得了 272
,而且还没有正确的答案.
任何建议都会有很大帮助:)
P.S我正在使用 php GD
.
像素与物理测量之间的相关性完全取决于显示器以及每(平方)毫米有多少个物理像素.72ppi(每英寸像素数)曾经是一种典型的分辨率,但是在许多设备上像素密度却在增加,这不再是给定的.
根本没有标准公式.
I am creating business card maker online, now so far everything was easy until i came to card rendering. In my html document i have:
width = 517px which is equals to 90mm
height = 287px which is equals to 50mm
And according to Photoshop 90mm -> 255px so I need to somehow convert 517px to 255px.
After some googling best solution i came up with so far is (517 / 5.7) * 3
which gives me 272
and it's far from correct answer.
Any suggestions would help a lot :)
P.S I am using php GD
.
The correlation between pixels and physical measurements depends entirely on the display and how many physical pixels there are per (square) millimeter. 72ppi (pixels per inch) used to be a typical resolution, but with pixel density increasing across many devices, that's not a given anymore.
There's simply no standard formula.
这篇关于转换px为mm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!