Questions tagged [ppi]

Pixels per inch (PPI) is a measurement of the pixel density (resolution) defined as the number of horizontal or vertical pixel found in an inch.

Pixels per inch (PPI) is a measurement of the pixel density (resolution) of devices in various contexts: typically computer displays, image scanners, and digital camera image sensors. It is defined as the horizontal or vertical density (for square pixels) as those are the same but the density on along the diagonal is lower.

Resources

92 questions
63
votes
15 answers

Detecting the system DPI/PPI from JS/CSS?

I'm working on a kind of unique app which needs to generate images at specific resolutions according to the device they are displayed on. So the output is different on a regular Windows browser (96ppi), iPhone (163ppi), Android G1 (180ppi), and…
Josh Santangelo
25
votes
4 answers

Getting actual screen dpi/ppi under windows

I would like to get the actual screen dpi/ppi, not the dpi setting used for font in C++. I tried with the following codes: Version 1, reports 72 dpi, which is wrong. SetProcessDPIAware(); //true HDC screen = GetDC(NULL); double hSize =…
Andy Li
  • 5,894
  • 6
  • 37
  • 47
17
votes
6 answers

DPI in Retina iPad app design

I don't know if this belongs in StackOverflow or some other SE site, but here goes. I have a PSD design I have an iOS development team turning into a Retina iPad app. However, this design is made in the default 72 dpi. The development team is now…
Emphram Stavanger
  • 4,158
  • 9
  • 35
  • 63
15
votes
4 answers

How to find PPI programmatically with precision

I am trying to find out PPI(Pixels Per Inch) in iOS. I couldn't find any direct way to query this like we do for display size UIScreen.mainScreen().bounds There is a way to do it by multiplying scale with standard generic PPI for iPhone(163) or…
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
14
votes
5 answers

get device PPI in javascript

How to get real PPI (pixels per inch) device resolution with javascript? some examples of device and value expected: iMac 27-inch: 109ppi iPad: 132ppi 19inch 1440x900 screen: 89ppi ...
Yukulélé
  • 15,644
  • 10
  • 70
  • 94
11
votes
3 answers

Calculate PPI of Android Device

How do I calculate PPI of Android device. Most specifically Android Tablets. Take a Note that I want to calculate PPI of the device and not DPI.
Sagar Patil
  • 1,400
  • 15
  • 29
9
votes
3 answers

How to classify Android Devices based on DPI values?

In Android, various devices are classified into different categories based on their density. LDPI = 120 DPI MDPI = 160 DPI HDPI = 240 DPI XHDPI = 320 DPI XXHDPI = 480 DPI XXXHDPI = 640DPI Here my doubt is, if an Android device has density as "200…
msg
  • 1,480
  • 3
  • 18
  • 27
5
votes
1 answer

PPI::Document bug or some special subroutine name?

i have some problems with PPI module: assume i have Foo.pm: package Foo; sub foo0 { 1; } sub foo1 { 1; } sub foo2 { 1; } sub foo3 { 1; } 1; and i want to use PPI to get all the subs: #!/usr/bin/env perl use PPI; my $filename = shift; my $Document…
Robert
  • 4,324
  • 2
  • 18
  • 22
5
votes
2 answers

Designing for Android - Resolution?

I'm designing an app for android, and the main devices we're targeting are Nexus S and Galaxy Tab, so I wonder which resolution should I design for and what PPI to use? I'd be using photoshop. Surprisingly, I couldn't find a single decent PSD…
eozzy
  • 66,048
  • 104
  • 272
  • 428
5
votes
1 answer

Is there a database of 'CSS pixel ratio' values for various devices?

Here's what I want to do: when I get an HTTP request, check a database server-side to look up 1) the physical device PPI, and 2) CSS pixel ratio (i.e. the number of "logical" or "reference" pixels per physical pixel). This allows me to supply the…
Matt Korostoff
  • 1,927
  • 2
  • 21
  • 26
4
votes
1 answer

Why PPI reported by Delphi is different from the calculated one?

I use Delphi 10.3 Rio, and need to know the screen PixelsPerInch ratio to scale my application accordingly. Calculating with the formula, my screen has 142 ppi. (Real values are: 15.5" diagonal and 1920 x 1080 resolution). But when I read in Delphi…
Marus Gradinaru
  • 2,824
  • 1
  • 26
  • 55
4
votes
1 answer

How do I find a comment with PPI and then insert code before it?

I'm trying to find the comment # VERSION in a perl source file. I then want to insert the version before the comment (or in place of doesn't matter). Could anyone tell me the right way to do this with PPI? before use strict; use warnings; package…
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
4
votes
2 answers

Android can i get the device dpi by ppi

I am developing an app for multiple screen support. I just visited the wiki Android DeviceDensity Comparison page. I want to convert ppi to dpi. for example: Samsung Galaxy Note has a ppi of 285 (according to the wiki page). But in the wiki page…
user1461742
3
votes
2 answers

The difference in image resolution (ppi) between C# and Photoshop

For example, C # says that the selected image contains 96 ppi, while that same image in Photoshop contains 72 ppi. Why is there a difference? I’m inclined to trust Photoshop in this case, and how to test image resolution if C# returns false…
3
votes
2 answers

Drawing a ruler in iOS - accurate 1 cm on screen - how to draw lines 1 mm apart?

I am trying to draw a ruler, for any available iOS device, with accurate 1mm distances between start of lines/ticks. Usually i would get the PPI and calculate my distance of the pixels. Using Objective-C, it does not seem to work this way. linesDist…
BananaAcid
  • 3,221
  • 35
  • 38
1
2 3 4 5 6 7