Questions tagged [resolution]

Questions about image resolution.

Image resolution is an umbrella term that describes the detail an image holds. Higher resolution means more image detail.

Reference

Wikipedia

2378 questions
950
votes
35 answers

Converting pixels to dp

I have created my application with the height and width given in pixels for a Pantech device whose resolution is 480x800. I need to convert height and width for a G1 device. I thought converting it into dp will solve the problem and provide the same…
Indhu
  • 9,806
  • 3
  • 18
  • 17
194
votes
33 answers

How do I get monitor resolution in Python?

What is the simplest way to get monitor resolution (preferably in a tuple)?
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
163
votes
12 answers

How can I get screen resolution in java?

How can one get the screen resolution (width x height) in pixels? I am using a JFrame and the java swing methods.
AndreDurao
  • 5,600
  • 7
  • 41
  • 61
141
votes
4 answers

How to calculate dp from pixels in android programmatically

I want to calculate dp from px programmatically. How to do it? I get resolution from: DisplayMetrics displaymetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); ht = displaymetrics.heightPixels; wt =…
Dawid Hyży
  • 3,581
  • 5
  • 26
  • 41
141
votes
4 answers

Image resolution for new iPhone 6 and 6+, @3x support added?

I have looked on few articles and discussion like one here and Here about image resolutions that new iPhones will use @3x images for display. Is it true? So does it mean we will have to keep three images? Say for example I have an image of 50 X 50,…
Bhumit Mehta
  • 16,278
  • 11
  • 50
  • 64
124
votes
23 answers

Recommended website resolution (width and height)?

Is there any standard on common website resolution? We are targeting newer monitors, perhaps at least 1280px wide, but the height may varies, and each browser may have different toolbar heights too. Is there any sort of standard to this?
Aximili
  • 28,626
  • 56
  • 157
  • 216
98
votes
7 answers

How to simulate a higher resolution screen?

Is there any way for the browser to test my websites in resolutions that are higher than my screens? E.g: I have a 1440 x 900 screen, and I want to test the website in 1920 x 1200, 1920 x 1080, etc.
HappyDeveloper
  • 12,480
  • 22
  • 82
  • 117
93
votes
10 answers

How can I get the resolution (width and height) for a video file from a linux command line?

I've been digging through the mplayer/mencoder and ffmpeg documentation and I can't seem to come up with anything. I'm not especially picky as to the output format as I can use a regular expression to pull it out, I just can't seem to get the data…
Jeremy Logan
  • 47,151
  • 38
  • 123
  • 143
86
votes
6 answers

Why do I need @1x, @2x and @3x iOS images?

Why do we need these 3 particular image types? If I have a button on my app with a background image say, 50 pixels x 50 pixels, why do I need 3 versions of this image? What's stopping me from just making one image that's much higher in res, say,…
CodeMark22
  • 1,199
  • 1
  • 9
  • 11
61
votes
4 answers

Do I need 14 different layouts to support all Android devices?

I'm really feeling confused. From the docs at developer.android.com, it seems in order to keep my images scaled correctly (aspect ratio too) across all current Android devices I need all these layouts below. Is that really what everyone is doing? …
wufoo
  • 13,571
  • 12
  • 53
  • 78
59
votes
23 answers

Getting the screen resolution using PHP

I need to find the screen resolution of a users screen who visits my website?
Elitmiar
  • 35,072
  • 73
  • 180
  • 229
55
votes
7 answers

Is there a way to determine android physical screen height in cm or inches?

I need to know exactly how big the screen is on the device in real units of length so I can calculate the acceleration due to gravity in pixels per millisecond. Is there a method somewhere in the Android API for this?
Nathan
  • 6,095
  • 10
  • 45
  • 54
50
votes
3 answers

How do you see / show a git merge conflict resolution that was done, given a merge commit SHA1?

When you resolve a conflict, then stage the changes, then do a git diff, it shows you two columns of +'s and -'s, one for "ours" and one for "theirs". Given a merge commit in a repo's git history, how do I see that resolution, which was done by…
Pistos
  • 23,070
  • 14
  • 64
  • 77
49
votes
8 answers

How to detect the current screen resolution?

How do I from Winapi (in C or C++) detect the current screen resolution? Some background: I want to start a new OpenGL fullscreen window, but want it open with the same horizontal and vertical size which the desktop already is set to. (Now when…
Prof. Falken
  • 24,226
  • 19
  • 100
  • 173
45
votes
6 answers

Changing DPI scaling size of display make Qt application's font size get rendered bigger

I have created some GUI application using Qt. My GUI application contains controls like push button and radio button. When I run the application, buttons and fonts inside button looks normal. When I change the DPI scaling size of display from 100%…
Arun
  • 2,247
  • 3
  • 28
  • 51
1
2 3
99 100