What is Pixel Density of a Device?
Thursday, December 6, 2018
What is Pixel Density or PPI?
Pixel density is a calculation that returns the number of physical pixels per inch on a screen or display of a device. It’s often referred to as Pixels Per Inch or PPI.
Pixel density has become increasingly important as the resolution of screens has increased dramatically in the past several years. For example, the Apple iPhone XR has a high resolution screen with a pixel density of 323. In contrast, older XGA monitors had a PPI of around 85. Increased PPI can improve the quality of the viewing experience. Even when held closely, high PPI screens do not look pixelated (assuming that the image is of high enough quality to begin with).
What are the Key Inputs for Pixel Density Calculation?
As you might expect, the resolution and physical dimensions of the screen go into the pixel density calculation.
Resolution_width and resolution_height of the screen give you the number of physical pixels. It’s important to note that these are physical pixels, not logical or CSS pixels.
The physical width and height of the screen converted into inches is in the denominator.
For a more detailed explanation, you can visit here.
It’s important to point out that most ua parsers or sniffers are not sophisticated or accurate enough to determine the device and its resolution and physical screen size. However, a fully fledged device detection solution like WURFL contains over 500 properties or capabilities of a device.
How Image Optimization Use Pixel Density?
While it has many use cases,
pixel_density is useful when optimizing, resizing, or reformatting images.
Pixel_density will tell you how far you can reduce the dimensions or compression of an image before visual quality is impacted.
ImageEngine has device-aware edge servers in its content delivery network (CDN). These servers use WURFL device detection to determine many device capabilities, including pixel density. If a device visits a website and there is not already an optimized image waiting in cache at the edge server, then it will pass pixel density and other device information back to ImageEngine’s optimization processor.
Give pixel density a trial by contacting ScientiaMobile and adding pixel_density to your WURFL capabilities.