in reply to Re: Conversion Modules from Pixels to Millimeters
in thread Conversion Modules from Pixels to Millimeters

On X11 systems, you can filter out the dpi number with the xdpyinfo command. On my system I get:
screen #0: dimensions: 1280x1024 pixels (361x292 millimeters) resolution: 90x89 dots per inch

If you have Tk available on your system, you can get the dpi number by using the screenheight, screenmmheight, screenwidth and screenmmwidth methods. See also the Tk::Widget documentation.

Replies are listed 'Best First'.
Re: Re: Re: Conversion Modules from Pixels to Millimeters
by DrHyde (Prior) on Apr 16, 2004 at 09:21 UTC
    That can only ever be a guess. It assumes that the system is set up properly, which is just crazy talk.
      It seems that modern X11 servers with modern monitors can retrieve the display information automatically. At least I can't find any reference to the display size or dpi information in the configuration files, but the information provided by xdpyinfo is pretty accurate (only about 0.5 centimeters off).