Image DPI in JavaScript/NodeJS and Electron?

I'm building an application using Electron primarily for Mac OS X. The user can drop an image onto the page, the page creates an <img> with the source path of the dropped image, and the user sees the image.

Problem

If the user takes a screenshot on a retina display and then drops the image onto the page, the image displays at double the size. I need to somehow know to display this image at half its natural dimensions.

Possible Solution

I believe I should be able to reliably tell if the image is retina if I check its DPI. In the Preview app on the Mac I can see that the image is 144 DPI. Essentially, if the DPI is 144 or greater, then it's retina, right?

Is there some way to read this data, given the image, using either Electron's Native Image or NodeJS?

Note: Mac OS X takes screenshots as PNGs, so there is no exif data.