Formula for pixel to millimeter and vice versa

by satheesh 2010-01-28 19:52:41

Millimeter to Pixel
*******************
$pixels = ($mm * $dpi) / 25.4

Pixel to Millimeter
*******************

$mm = ($pixels * $25.4) / dpi


ex : milli meter to pixel
*************************
Let me explain a little bit.

1 inch = 25.4 mm

If we assume a resolution of e.g. 300 dpi (that's 300 dots or pixels per inch)
then 100 mm (being approx. 4 inches) is 300*4 = 1200 pixels

The formula gives:
100 * 300 / 25.4 = 1181 pixels

Tagged in:

2810
like
0
dislike
0
mail
flag

You must LOGIN to add comments