Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Pixel
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Pixel
(section)
Add topic