Skip Navigation
Paperless office; document/image processing @sopuli.xyz plantteacher @mander.xyz

How to obtain the density (DPI / PPI) of a PGM file -- anyone know? ImageMagick does not cut it.

Running this gives the geometry but not the density:

$ identify -verbose myfile.pgm | grep -iE 'geometry|pixel|dens|size|dimen|inch|unit'

There is also a “Pixels per second” attribute which means nothing to me. No density and not even a canvas/page dimension (which would make it possible to compute the density). The “Units” attribute on my source images are “undefined”.

Suggestions?

4
4 comments