Convert pixel to mm

edited January 2014 in How To...

Hi there,

I'm doing a project that need me to scale the object to mm. I've been searching the forum but couldn't find one related to converting pixel per inch to pixel per mm


  • pixelPerMillimeter = pixelPerInch * 0.03937;

  • thx.. how do i check whether my sketch is pixel per mm or pixel per inch?

  • edited January 2014

    That is not based on your sketch or Processing, it is based on the display device itself (your computer probably). For example, my screen is 1440 pixels wide so if I took out a ruler and measured how wide it was I would know how many pixels per inch / mm there were.

  • if my sketch is made in a 15 inch monitor with 1440 pixel, i get one value of pixel per inch and use it as conversion constant for my drawings.. if i move the sketch file to a different size monitor with different resolution, do i need to change the conversion constant again?

  • If the pixels per inch are different on the other display then yes, you will have to change the constant

  • That's depending on your output source... If you're using an Flat Screen for output, or if you're printing your project to an paper using inkjet printer, you will have different dimensions. You can calculate your sizes in inches here... then convert to centimeters.

Sign In or Register to comment.