A png file may contain the physical pixel size in a pHYs segment:


This info may be extracted by the new function "getPixelDimension" of the following branch: