[ . . . ] there currently is no attempt to assign such a value when creating raster image files (such as PNG and JPEG.) I do now see in Qt there are the QImage.setDotsPerMeterX and QImage.setDotsPerMeterY methods which presumably set these values (and hopefully not anything more than that). So I can try adding that in.
Thank you for your positive response. It's not an urgent issue at all. It's just that It would be a nice enhancement, I think.
When PyFerret does need DPI values, for displayed windows it does get the values for the window using the physicalDpiX and physicalDpiY methods of the QMainWindow. For windows that are not displayed (so using the "-nodisplay" command-line option for PyFerret), the default value of 96 DPI is assigned since there is no display to obtain a value from, and that value was pretty standard at the time.
What I (think I) found after my initial email message was that the PNG file from a "-nodisplay" run does not include DPI info whereas that from a displayed run includes "28.35 x 28.35 pixels/cm" in its header(*footnote), which corresponds to 72 x 72 pixels/inch.
Regards,
Ryo
--------------------
(*footnote) For the curious, the "identify" command of the ImageMagick suit displays these pieces of information:
Also, open the image with GIMP and go to "Image" > "Image Properties". (On the other hand, "Image" > "Metadata" > "View Metadata" shows the image's Exif header, which seems to include a low-precision version of resolution info such as "28 x 28 pixels/cm".)