Know image PPI in javascript or php to calculate printing dimensions of an image

177 Views Asked by At

I'm doing an e-shop por a printing house, and they want to let people upload images in jpg and calculate the size in cm of the image to know how much to charge the costumers.

I know the math to do de calculation would be (height or width in pixels) / PPI * 2.54 = dimensions in centimeters, or at least that's how it is done in Illustrator. I know how to get the natural width and height in pixels of an image, but not the PPI.

0

There are 0 best solutions below