A simple question that I have been having great difficulty finding a definitive answer to: do PNG files have a DPI? Or perhaps more importantly, is it even relevant when bu
PNG does have the ability to store pixels/meter, separately for the X and Y direction, in the PNG "pHYs" chunk. Unfortunately this does not allow exact conversions (72 dpi is 2834.64566929 pixels per meter which is stored as 2835 pixels/meter and when converted back to DPI becomes 72.009); some people find this disturbing.
JPEG also can store X_density and Y_density, in units pixels/inch or pixels/cm.