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?

  • @Zachariah
    link
    2
    edit-2
    2 months ago

    Yeah, I’d guess it’s the number of pixels (or number of bytes) triggering the bug, but it’s being communicated to the user as dpi.

    dpi is (usually) really a function of the graphics program, and images can be scaled/shown/printed at different (with limitations) dpi regardless of pixel dimensions. Usually, dpi dictates the native size of the image in the real world (on the monitor or on paper), or can affect the clarity of the image if the resolution of the image doesn’t match the resolution of the display. It’s not exactly the size of the image—but it’s often closely related.