Getting width and height of image without loading the file

Is there a command that will let me get the properties of an image file (width & height) without having to actually load the file?


fs.statSync(pathAndFilename) will give me the file size, but no width/height info.  I'd really prefer to not have to load the file as I want to do a heap of these as the database is being loaded.
You'd need at the very least the size of each pixel (probably 32 for pngs), the size of the file header, and either the width or height of the file already. Unless I'm forgetting somethings that's the best you can do. 
🙁   I was afraid of that


Oh well, back to the drawing board ...
May I Ask what you're trying to accomplish? 
shhh, it's a secret 😉    I hope to release a plugin by the end of the week, but it's slow going.

Original thread: https://forums.rpgmakerweb.com/threads/getting-width-and-height-of-image-without-loading-the-file.64664/