Iphone sizes in pixels
The coordinate system iOS uses to place content onscreen is based on measurements in points, which map to pixels in the display. A standard-resolution display has a 1:1 pixel density (or @1x), where one pixel is equal to one point. High-resolution displays have a higher pixel density, offering a scale factor of 2.0 or 3.0 (referred to as @2x and @3x). As a result, high-resolution displays demand images with more pixels.
For example, suppose you have a standard resolution (@1x) image that’s 100px × 100px. The @2x version of this image would be 200px × 200px, and the @3x version would be 300px × 300px.
Supply high-resolution images for all artwork in your app, for all devices your app supports. Depending on the device, you accomplish this by multiplying the number of pixels in each image by a specific scale factor.
Device | Scale Factor |
---|---|
12.9″ iPad Pro | @2x |
11″ iPad Pro | @2x |
10.5″ iPad Pro | @2x |
9.7″ iPad | @2x |
7.9″ iPad mini 4 | @2x |
iPhone X S Max | @3x |
iPhone X S | @3x |
iPhone X R | @2x |
iPhone X | @3x |
iPhone 8 Plus | @3x |
iPhone 8 | @2x |
iPhone 7 Plus | @3x |
iPhone 7 | @2x |
iPhone 6s Plus | @3x |
iPhone 6s | @2x |
iPhone SE | @2x |
Designing High-Resolution Artwork
Use an 8px-by-8px grid. A grid keeps lines sharp and ensures that content is as crisp as possible at all sizes, requiring less retouching and sharpening. Snap the image boundaries to the grid to minimize half pixels and blurry details that can occur when scaling down.
Produce artwork in the appropriate format. In general, use de-interlaced PNG files for bitmap/raster artwork. PNG supports transparency and, because it’s lossless, compression artifacts don’t blur important details or alter colors. It’s a good choice for intricate artwork that requires effects like shading, textures, and highlights. Use JPEG for photos. Its compression algorithm usually produces smaller sizes than lossless formats and artifacts are harder to discern in photos. Photo-realistic app icons, however, look best as PNGs. Use PDF for glyphs and other flat, vector artwork that requires high-resolution scaling.
Use the 8-bit color palette for PNG graphics that don’t require full 24-bit color. Using an 8-bit color palette reduces file size without reducing image quality. This palette is not appropriate for photos.
Optimize JPEG files to find a balance between size and quality. Most JPEG files can be compressed without noticeable degradation of the resulting image. Even a small amount of compression can save significant disk space. Experiment with compression settings on each image to find the optimal value that yields an acceptable result.
Provide alternative text labels for images and icons. Alternative text labels aren’t visible onscreen, but they let VoiceOver audibly describe what’s onscreen, making navigation easier for people with visual disabilities.
Источник
Viewport Sizes for iPhone
Apple iPhone have Retina Display, Which means iPhone screen shows 2x or 3x higher resolution display instead of normal display to our Eye.
In Retina display, ONE pixel may contains many more pixels, thats why Retina Display or Device Dimensions got bigger and we see high resolution of images and content in smaller display. However devices’ actual dimensions depends on actual Pixels Per Inch which is called «Viewport Size» of device or «device-width». Web designs for mobile or CSS responsive styles are based on viewport size of devices, Click here to see popular devices viewport table.
Here we list down all Apple iPhone models with their viewport size, resolution, pixel density, screen size and CSS media queries respectively:
Device Name | Viewport SizePX | Device Resolution PX | Screen Size | Pixel Ratio | Density PPI | CSS PPI | Media Queries |
---|---|---|---|---|---|---|---|
Apple iPhone 12 mini | 360 x 780 | 1080 x 2340 | 5.4″ | 3.0 | 476 | 159 | |
Apple iPhone 12 Pro Max | 428 x 926 | 1284 x 2778 | 6.7″ | 3.0 | 458 | 153 | |
Apple iPhone 12 Pro | 390 x 844 | 1170 x 2532 | 6.1″ | 3.0 | 460 | 153 | |
Apple iPhone 12 | 390 x 844 | 1170 x 2532 | 6.1″ | 3.0 | 460 | 153 | |
Apple iPhone SE (2020) | 375 x 667 | 750 x 1334 | 4.7″ | 2.0 | 326 | 163 | |
Apple iPhone 11 Pro Max | 414 x 896 | 1242 x 2688 | 6.5″ | 3.0 | 458 | 153 | |
Apple iPhone 11 Pro | 375 x 812 | 1125 x 2436 | 5.8″ | 3.0 | 458 | 153 | |
Apple iPhone 11 | 414 x 896 | 828 x 1792 | 6.1″ | 2.0 | 326 | 163 | |
Apple iPhone XS Max | 414 x 896 | 1242 x 2688 | 6.5″ | 3.0 | 458 | 153 | |
Apple iPhone XR | 414 x 896 | 828 x 1792 | 6.1″ | 2.0 | 326 | 163 | |
Apple iPhone X | 375 x 812 | 1125 x 2436 | 5.8″ | 3.0 | 458 | 153 | |
Apple iPhone 8 | 375 x 667 | 750 x 1334 | 4.7″ | 2.0 | 326 | 163 | |
Apple iPhone 8 Plus | 414 x 736 | 1080 x 1920 | 5.5″ | 3.0 | 401 | 134 | |
Apple iPhone 7 | 375 x 667 | 750 x 1334 | 4.7″ | 2.0 | 326 | 163 | |
Apple iPhone 7 Plus | 414 x 736 | 1080 x 1920 | 5.5″ | 3.0 | 401 | 134 | |
Apple iPhone 6s Plus | 414 x 736 | 1080 x 1920 | 5.5″ | 3.0 | 401 | 134 | |
Apple iPhone SE | 320 x 568 | 640 x 1136 | 4.0″ | 2.0 | 326 | 163 | |
Apple iPhone 6s | 375 x 667 | 750 x 1334 | 4.7″ | 2.0 | 326 | 163 | |
Apple iPhone 6 | 375 x 667 | 750 x 1334 | 4.7″ | 2.0 | 326 | 163 | |
Apple iPhone 5s | 320 x 568 | 640 x 1136 | 4.0″ | 2.0 | 326 | 163 | |
Apple iPhone 5c | 320 x 568 | 640 x 1136 | 4.0″ | 2.0 | 326 | 163 | |
Apple iPhone 5 | 320 x 568 | 640 x 1136 | 4.0″ | 2.0 | 326 | 163 |
This website uses cookies, We and our partners use technology such as cookies to analyse our traffic and to show you personalised content and ads. You consent to our cookies by clicking «Agree» or by continuing to use our website.
Источник
Calculating pixel size on an iPhone
Is there a way in the iPhone SDK to calculate the size (in millimeters) of a single pixel?
2 Answers 2
Answering the question as asked about the size of pixels:
Pixel size on an iPhone and iPod Touch
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.
The first three iPod touch generations stated the same 163 ppi.
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.
The fourth generation iPod touch (Sept 2010) has specs the same as the iPhone 4, 960-by-640-pixel resolution at 326 ppi
The iPhone 4S (Oct 2011) is unchanged from the iPhone 4 in terms of resolution.
The iPhone 5 (Sept 2012) specs said 1136-by-640 pixel resolution at 326 ppi. Pixel size is unchanged. Screen diagonal is 4 inches.
The iPhone 5C and iPhone 5S (Sept 2013) have the same resolution, pixel size, and diagonal as the iPhone 5.
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.
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
- 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.
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.
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.
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.
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.
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.
Источник