
20 Sep
2018
20 Sep
'18
9:41 a.m.
Is there a viewer which allows us to see the dpi settings (pixels per unit) of a png?
$ identify -verbose file.png | grep pHYs
Is it set to something specific based on the user-entered dpi resolution?
Yes, except if overwritten by user-entered value in "pHYs dpi" box (committed Sep 25, 2017) in "Advanced" settings of "Export PNG" dialog.
$ identify -verbose rect10.png | grep pHYs png:pHYs: x_res=3779, y_res=3779, units=1 => (in pixels per meter, divide by 39,3701) => 96 ppi
$ identify -verbose rect10_72.png | grep pHYs png:pHYs: x_res=2834, y_res=2834, units=1 => 72 ppi