Git Product home page Git Product logo

dpi's Introduction

DPI ♥︎

DPI Love is a little web application that easily finds the DPI/PPI of any screen.

dpi's People

Contributors

ad-si avatar alanaktion avatar alastc avatar arkon avatar arthraim avatar asbjornu avatar cassidyjames avatar dos1 avatar efeichen avatar gatoravi avatar georgemarshall avatar giannoug avatar iamsebastian avatar incognitojam avatar jorgecasar avatar kirilloid avatar kurokasei avatar leaverou avatar matej-hlatky avatar mouseion avatar rosylilly avatar sayzlim avatar simleb avatar sindrenm avatar svgeesus avatar tplive avatar ultim8k avatar uzee avatar vassilevsky avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dpi's Issues

Add iPad Mini 2

The iPad Mini 2 has a resolution of 1536x2048 and a diagonal measurement of 7.9 inches, for a ppi of 324.

Samsung S7 and S7 Edge PPI (2560x1440)

Both phones feature QHD (2560x1440 pixel) Super AMOLED displays, with the Galaxy S7's 5.1in setup packing in 577ppi, and the larger 5.5in Galaxy S7 edge a slightly lower, but no less impressively sharp 534ppi.

Is the Nexus 9 ddpx of 1 correct?

It says it has a dppx of 1 on the live site. Can anyone confirm this for sure? I would think a 9" tablet with resolution that high would be at least a dppx of 2. The iPad's that have the same resolution have dppx of 2.

Wrong Diagonal

Hey @LeaVerou, thanks for such a useful site and created while travelling? Awesome!

Anyways, when I view the site on Retina MacBook 15" it shows wrong diagonal. Instead of 15.4" it shows 13.3", thought I should let you know 😄

Landscape/portrait consistency

Why do some screen sizes have larger widths than heights but others don't? For instance, as of d171cb2, Sony Xperia Z5 Premium has a resolution of 3840x2160 in screens.json, so if you click on that device name on the web app, you get a landscape "preview" of the device screen. But Samsung Galaxy S6, S6 Edge has a saved resolution of 1400x2560, so clicking on that device name gives you a portrait preview.

This is confusing IMHO. Can we/do we have a consensus on which orientation (landscape or portrait) to use? Maybe we could have landscape orientation for tablets but portrait for phones?

Incorrect value for iPhone5

My phone iphone5 ios10. In demo shows my phone 98ppi and 13.3". I dont think this is correct values as 13.3" isn't a small value. Thanks for amazing library.
I will be happy to see fix for this

incorrect diagonal when used with dual display

Hi Lea,

Firstly, nice work and thanks for sharing.

I noticed when viewing on a 13 inch MBP plugged into an external 24inch cinema display - moving the browser window between screens and refreshing updates the resolution correctly but not the diagonal - this stays at 13.3 even when viewing on the cinema display..

Hopefully that makes sense - let me know if you'd like any further information.

Andy

Dppx value shown on dpi.lv is misleading when not defined in screens.json

When the dppx value is not defined in screens.json the value shown on dpi.lv is equal to 1 which is misleading.

Example:

{
"name": "Google Nexus 5",
"w": 1920,
"h": 1080,
"d": 4.95
}

and then the table "Known screens" on dpi.lv shows:

Name Diagonal Resolution DPI dppx
Google Nexus 5 4.95″ 1920×1080 445 1

When dppx is unknown it should be reflected in the table as for Nexus 5 it is 3, not 1.

Calculating diagonal value

How is the diagonal value calculated. Do we need to use hardcoded values for diagonal when passing to CalcDPi function?

Bad values for Nokia Lumia 1020

Hello,

dpi.lv says that my Lumia 1020 has :

  • a 13.3" diagonal
  • a 53 pixels per inch resolution

Actually, the right value is 4.5″ and 332dpi

Description and use of dppx seems inaccurate

In the FAQ it says:

"DPI is often used for the actual device pixels and Dots Per Pixel (dppx) for the amount of device pixels per CSS pixel (e.g. in Retina displays this will be 2)."

Unfortunately, the term "dppx" is misleading because it implies there are 2 dots displayed for every pixel defined in CSS, when what's really happening is there's a device pixel ratio multiplied on both planes, so on a Retina device 1 pixel defined in CSS is displayed as 4 pixels (2px high and 2px across). A 10x10 pixel box (100 pixels) becomes a 20x20 pixel box (400 pixels) on a Retina device.

It seems like in the table of common devices it would make sense to change the heading from dppx to "Pixel Ratio," or something like that but I'm not sure of a clear, pithy way to update the FAQ to clarify that point.

Why are the PPI values hardcoded?

Instead of hardcoding the ppi values in the screens.json file, why don't you calculate them on-the-fly using the formula below?

ppi = Math.round( Math.sqrt( Math.pow(w,2) + Math.pow(h,2) ) / d )

Feature request: Show CSS Resolution

We usualy check dpi.lv for check dppx in mobile devices for calculate CSS Resolution
Whats your idea about calculate css resolution by dppx (if available) and show in the list ?
If interested, may i pull request ?

Add Micromax A110

{

  •   "name": "Micromax A110",
    
  •   "w": 480,
    
  •   "h": 856,
    
  •   "d": 4.9,
    
  •   "ppi": 200
    

}

Rewrite Javascript and some feature request

I want to rewrite dpi.lv js with simple angular for faster and more feature
For example we need a sort columns by click on header
Or we need better search, (fuzzy search on every columns)
Or separate device name and manufacture for group all manufacture by sort that column
And so many other idea ...
I'm expert in angular.js and i can do in 2day
Could you please accept pull request ?

Samsung Galaxy S6

The Samsung Galaxy S6 has a resolution of 1440x2560 with a display size of 5.1", making for a dpi of approximately 577.

The S6 Edge has the same specifications.

Missleading values for iPhone 6/6S/7 Plus screens

The iPhone Plus family uses a fancy hardware scaling to use LCD screens with a PPI that can be mass produced (1080 × 1920) but internally the framebuffer is 1242 × 2208 to better fit legacy Apps.
They use a hardware downscale on chip to end up with the native LCD size. The reason was to stay compatible to native Apps written for older phones and just bump up the retina factor from 1 or 2 to 3.

Alls of this is explained in detail on this website:
https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions

So I suggest to have two entries in the device list:

Apple iPhone 6/6s/7 Plus framebuffer pixels  1242 x 2208  461   3
Apple iPhone 6/6s/7 Plus native LCD pixels   1080 x 1920  401  2.46

ThinkPad X60 Tablet

Please add this piece of hardware.

The screen is always 12.1 inches. The actual panels are either 1024x768 or 1400x1050.

Inaccurate dppx values?

It seems unlikely that all of these dppx values would be 1?

image

Specifically, my own Google Pixel device has a dppx value of 2.63, according to https://mydevice.io/ This data lists the Google Pixel dppx value as 1 though.

Should these values be changed to Unknown or something?

Add support for ppcm

I think we should add support for metric units. Either as a switch or as another column in the table.

List iPhone 4 and iPhone 4S separately, same for iPhone 1, 3G, 3GS

While it is quite clear to me that "iPhone 4(S)" means "iPhone 4" and "iPhone 4S", it could be confusing to those less tech-savvy, and also doesn't show up when i type "4S", or "iPhone 4S" in the search box.

The same thing applies for the "iPhone 1 & 3G(S)"

Not meant to be nitpicky or to create extra work for you!

I may make a pull request but have to get a few other things done today first!

Wrong diagonal screen size calculated leading to wrong dpi

I'm using a Lenovo A3300-HV tablet. It has a resolution of 1024x600 and a dpi of 169 (Verfied by a third-party app CPU-Z). It is a 7" tablet

Your site http://dpi.lv , on visiting from the tablet correctly displays the resolution but incorrectly calculated the diagonal screen size. It should have been 7" but the site displayed 13.3" leading to a wrong dpi (89, instead of 169).

FWIW, I used the latest version of Chrome for Android when visiting your site

Re-do DPI test when change of monitor

For those times when people have multiple monitors (like laptop and desktop display monitor), but they all don't have the same DPI.

Would like to have DPI test re-run if it notices a change in screensize changes.

Has such a feature been proposed before?

Would it make a good fit here?

Virtual Reality makes this library VERY valuable

VR devices need to know the actual size of a cellphone placed in, say, Google Cardboard or Samsung Gear VR. Current VR libraries are doing some basic sniffing, but not enough to really make a boilerplate for WebVR. The more data on large-format smartphones (e.g. 5" and 6" models) the better!

Save screen dpi

@LeaVerou Nice Project.

What do you think about this feature ?
Log/Save clients screen resolution and dpi

It can be a great list of devices screen dpi and resolution in future.

Safari issue with location.hash

In Safari (v6.0.5 OS X), the links to the various sizes doesn't change the inputs - the hashChange event fires, but the hash value doesn't match the Regex.

It looks like the hash comes back URL-encoded:

location.hash // => #2880%C3%[email protected]%E2%80%B3

Whereas running decodeURIComponent() seems to do the right thing:

decodeURIComponent(location.hash) // => #2880×[email protected]

Galaxy S8/S8+

Please add new device Galaxy S8 and S8+.

Samsung Galaxy S8 - 1440x2960 5.8"
Samsung Galaxy S8+ - 1440x2960 6.2"

Add Tesco Hudl 2

Resolution is 1920 x 1200
dppx is 2
diagonal is 8.3"
273 dpi
user agent: Mozilla/5.0 (Linux; Android 4.4.2; Hudl 2 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Safari/537.36

Add a license

Could you please add a license file to the project.
Would be really helpful. Thanks!

Calculation is incorrect for MBP + ACD

With a 24" LED Cinema Display (1920x1200) attached to a closed 17" MPB (1920x1200), the site thinks my diagonal is 13.3in and 170 PPI. This is wrong for both screens, not sure why.

Aside, cool plane-project!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.