Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Pixel
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Logical pixel<span class="anchor" id="Logical"></span>=== In graphic, web design, and user interfaces, a "pixel" may refer to a fixed length rather than a true pixel on the screen to accommodate different [[pixel densities]]. A typical definition, such as in [[CSS]], is that a "physical" pixel is {{convert|1/96|in|mm}}. Doing so makes sure a given element will display as the same size no matter what screen resolution views it.<ref>{{cite web|url=https://www.w3.org/Style/Examples/007/units.en.html|publisher=w3.org|title=CSS: em, px, pt, cm, in...|date=8 November 2017|access-date=21 December 2017|url-status=live|archive-url=https://web.archive.org/web/20171106223130/http://www.w3.org/Style/Examples/007/units.en.html|archive-date=6 November 2017}}</ref> There may, however, be some further adjustments between a "physical" pixel and an on-screen logical pixel. As screens are viewed at difference distances (consider a phone, a computer display, and a TV), the desired length (a "reference pixel") is scaled relative to a reference viewing distance ({{convert|28|in|cm}} in CSS). In addition, as true screen pixel densities are rarely multiples of 96 dpi, some rounding is often applied so that a logical pixel is an integer amount of actual pixels. Doing so avoids render artifacts. The final "pixel" obtained after these two steps becomes the "anchor" to which all other absolute measurements (e.g. the "centimeter") are based on.<ref>{{cite web |title=CSS Values and Units Module Level 3 |url=https://www.w3.org/TR/css-values-3/#ref-for-pxβ‘ |website=www.w3.org}}</ref> Worked example, with a {{convert|30|in|cm|adj=on}} 2160p TV placed {{convert|56|in|cm}} away from the viewer: * Calculate the scaled pixel size as {{math|1={{frac|1|96}} in Γ (56/28) = {{convert|1/48|in|mm}}}}. * Calculate the DPI of the TV as {{math|1=2160 / (30 in / {{sqrt|9^2 + 16^2}} Γ 16) β 82.61 dpi}}. * Calculate the real-pixel count per logical-pixel as {{math|1={{frac|1|48}} in Γ 82.61 dpi β 1.721 pixels}}. A browser will then choose to use the 1.721Γ pixel size, or round to a 2Γ ratio.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)