Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pixel to Centimeter?

I just want to know if the pixel unit is something that doesn't change, and if we can convert from pixels to let's say centimeters ?

like image 785
Nassif Bourguig Avatar asked Aug 27 '09 15:08

Nassif Bourguig


People also ask

How much is 3.5 cm * 4.5 cm in pixels?

3.5cm x 4.5cm at 100 dpi is equivalent to 138 x 177 pixels.


1 Answers

Similar to this question which asks about points instead of centimeters. There are 72 points per inch and there are 2.54 centimeters per inch, so just substitute 2.54 for 72 in the answer to that question. I'll quote and correct my answer here:

There are 2.54 centimeters per inch; if it is sufficient to assume 96 pixels per inch, the formula is rather simple:

centimeters = pixels * 2.54 / 96

There is a way to get the configured pixels per inch of your display for Microsoft Windows called GetDeviceCaps. Microsoft has a guide called "Developing DPI-Aware Applications", look for the section "Creating DPI-Aware Fonts".

like image 98
Mark Ransom Avatar answered Sep 18 '22 13:09

Mark Ransom