计算 iPhone 上的像素大小

发布于 2024-07-14 07:53:38 字数 41 浏览 3 评论 0原文

iPhone SDK中有没有办法计算单个像素的大小(以毫米为单位)?

Is there a way in the iPhone SDK to calculate the size (in millimeters) of a single pixel?

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

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

发布评论

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

评论(2

花期渐远 2024-07-21 07:53:39

回答有关像素大小的问题:

iPhone 和 iPod Touch 上的像素大小

  1. 早期的 iPhone(iPhone 之前的版本) 4) Apple iPhone 技术规格称:480 x 320 像素分辨率,每英寸 163 像素(ppi)。 每像素大约 0.006135 英寸或每像素 0.1558282 毫米。

  2. 前三代 iPod touch 的分辨率相同为 163 ppi。

  3. iPhone 4 规格称分辨率为 960 x 640 像素,326 ppi 。 因此,像素宽度为 1 英寸/每英寸 326 像素,或者大约每像素 0.003067 英寸或每像素 0.0779 毫米。 您使用的是点,而不是像素。 编辑:正如下面奥拉夫评论中所指出的,像素实际上是可寻址的,使用半点。

  4. 第四代 iPod touch(2010 年 9 月)已
    规格与 iPhone 4 相同,960 x 640 像素分辨率 326 ppi

  5. iPhone 4S(2011 年 10 月)在分辨率方面与 iPhone 4 相比没有变化。

  6. iPhone 5(2012 年 9 月)规格称分辨率为 1136 x 640 像素,326 ppi。 像素大小不变。 屏幕对角线为 4 英寸。

  7. iPhone 5CiPhone 5S(2013 年 9 月)与 iPhone 5 具有相同的分辨率、像素大小和对角线。

  8. iPhone 6,4.7英寸,(2014 年 9 月)
    规格 为 1334-by-750 - 像素分辨率,
    每英寸 326 像素 (ppi)。 像素大小从 4、4S、5 5s 不变。

  9. iPhone 6 Plus,5.5 英寸,(2014 年 9 月)
    规格 为 1920 年 x 1080 年- 像素分辨率,
    每英寸像素 (ppi) 401。 像素尺寸大约小 20%。 像素宽度为 1 英寸/每英寸 401 个像素或大约每像素 0.002494 英寸或每像素 0.06334 毫米。

iPad 上的像素大小

  1. iPad 12 的显示屏为 9.7 英寸(对角线),分辨率为 1024 x 768 像素,132 ppi。 这大约是每像素 0.0075758 英寸或每像素 0.1924 毫米。

  2. 新款 iPad(2012 年 3 月)配备 9.7 英寸(对角线)显示屏,分辨率为 2048 x 1536 像素,264 ppi
    根据当前的 iPad 规格
    这大约是每像素 0.0037879 英寸或每像素 0.09621 毫米。
  3. iPad Mini(第一代 - 2012 年 10 月)采用 7.9 英寸(对角线)显示屏,分辨率为 1024 x 768 像素,与原始 iPad mini 一样,163 ppi眼镜。 那是关于
    每像素 0.006135 英寸或每像素 0.156 毫米。
  4. iPad Mini 2(第 2 代 - 2013 年 10 月)是一款 7.9 英寸(对角线)显示屏,分辨率为 2048 x 1536 像素,按照当前326 ppi a href="http://www.apple.com/ipad-mini/specs/" rel="nofollow noreferrer" title="Apple - iPad mini 规格">iPad mini 规格。 那是关于
    每像素 0.0030675 英寸或每像素 0.0779 毫米。
  5. iPad Air 2(2014 年 10 月)和 iPad Mini 3(2014 年 10 月)与这些产品的先前版本具有相同的分辨率、像素大小和对角线。


    iPad Air 与 iPad Air 2、iPad Mini、iPad 2 和 iPad3 的比较。

您不需要让 iPhone SDK 计算单个像素的大小。 一种选择是 确定您所运行的设备,然后选择所需的毫米尺寸。

具有 3.5 英寸(对角线)显示屏的 iPhone(直至并包括 4S)/iPod Touch 屏幕尺寸不完全是 2 英寸 x 3 英寸。 它们比那小一点点。 iPhone 5 配备 4 英寸(对角线)显示屏。

提问者实际上可能需要什么:分数。
请参阅删除者对上一个答案的评论。 坐标以点而非像素指定。

Answering the question as asked about the size of pixels:

Pixel size on an iPhone and iPod Touch

  1. The earlier iPhones (pre-iPhone 4) Apple iPhone Technical Specifications said : 480-by-320-pixel resolution at 163 pixels per inch(ppi). About 0.006135 inches per pixel or 0.1558282 mm per pixel.

  2. The first three iPod touch generations stated the same 163 ppi.

  3. The iPhone 4 specs said 960-by-640-pixel resolution at 326 ppi . So pixel width is 1 inch / 326 pixels per inch or about 0.003067 inches per pixel or 0.0779 mm per pixel. You use points, not pixels. Edit: As noted in Olaf's comment, below, pixels are actually addressable, using half-points.

  4. The fourth generation iPod touch (Sept 2010) has
    specs the same as the iPhone 4, 960-by-640-pixel resolution at 326 ppi

  5. The iPhone 4S (Oct 2011) is unchanged from the iPhone 4 in terms of resolution.

  6. The iPhone 5 (Sept 2012) specs said 1136-by-640 pixel resolution at 326 ppi. Pixel size is unchanged. Screen diagonal is 4 inches.

  7. The iPhone 5C and iPhone 5S (Sept 2013) have the same resolution, pixel size, and diagonal as the iPhone 5.

  8. The iPhone 6, 4.7 inch, (Sept 2014)
    specs are 1334-by-750-pixel resolution,
    at 326 pixels per inch (ppi). pixel size is unchanged from 4, 4S, 5 5s.

  9. The iPhone 6 Plus, 5.5 inch, (Sept 2014)
    specs are 1920-by-1080-pixel resolution,
    at 401 pixels per inch (ppi). pixel size is about 20% smaller. The pixel width is 1 inch / 401 pixels per inch or about 0.002494 inches per pixel or 0.06334 mm per pixel.

Pixel size on an iPad

  1. The iPad 1 and 2 are 9.7 inch (diagonal) display with 1024-by-768-pixel resolution at 132 ppi per the iPad specs. That is about .0075758 inches per pixel or 0.1924 mm per pixel.

  2. The new iPad (March 2012) is a 9.7 inch (diagonal) display with 2048-by-1536-pixel resolution at 264 ppi
    per the current iPad specs.
    That is about .0037879 inches per pixel or 0.09621 mm per pixel.
  3. The iPad Mini (1st generation - October 2012) is a 7.9 inch (diagonal) display with a 1024-by-768-pixel resolution at 163 ppi per the original iPad mini specs. That is about
    .006135 inches per pixel or 0.156 mm per pixel.
  4. The iPad Mini 2 (2nd generation - October 2013) is a 7.9 inch (diagonal) display with a 2048-by-1536-pixel resolution at 326 ppi per the current iPad mini specs. That is about
    .0030675 inches per pixel or 0.0779 mm per pixel.
  5. The iPad Air 2 (October 2014) and the iPad Mini 3 (October 2014) have the same resolution, pixel size, and diagonal as the previous versions of those products.


    Comparison of the iPad Air, and iPad Air 2, iPad Mini, iPad 2 and iPad3.

You don't need to have the iPhone SDK calculate the size of a single pixel. One option is to determine what you are running on and then select the needed mm size.

The iPhone (up to and including the 4S) / iPod Touch screen sizes, with a 3.5 inch (diagonal) display are NOT exactly 2" x 3". They are a tiny bit smaller than that. The iPhone 5 has a 4 inch (diagonal) display.

What the questioner may actually need: points.
See Removers comment to the previous answer. Coordinates are specified in points, not pixels.

演出会有结束 2024-07-21 07:53:39

嗯,像素的大小是一个常数。 当前 iPhone 或 iPod touch 的屏幕尺寸为 2" x 3" (50.8 mm x 76.2 mm),分辨率为 320 x 480 像素。

50.8 / 320 (或 76.2 / 480) => 1 像素的尺寸为 0.15875 毫米 x 0.15875 毫米

Well, the size of a pixel is a constant. The screen size of a current iPhone or iPod touch 2" x 3" (50.8 mm x 76.2 mm) and the resolution is 320 x 480 pixel.

50.8 / 320 (or 76.2 / 480) => the size of 1 pixel is 0.15875 mm x 0.15875 mm

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