1

I have an input=file element in the HTML page which is used to upload JPEG images.

<input type="file" id="input-id" accept="image/jpeg,image/jpg" onchange="verifyFileUpload(event)">

How can I get the DPI (dots per inch) of the selected file image using only Javascript?

Do we need to calculate using resolution and image size (in inches, how to get that?) or is there any in-built JS function?

S_S
  • 1,276
  • 4
  • 24
  • 47
  • https://stackoverflow.com/questions/279749/detecting-the-system-dpi-ppi-from-js-css – Azad Oct 04 '18 at 04:39
  • @azad I needed the DPI of the selected image from the `input=file` element, not the screen/display DPI. – S_S Oct 04 '18 at 04:43

0 Answers0