in reply to Conversion Modules from Pixels to Millimeters

You can't - until you know where that picture is going to be used. It depends on DPI (dots per inch) of the output device.

Is it going to be displayed on a monitor? Then it might be 100 DPI or 75 DPI (those two values are usualy used for the sizing of fonts) or if the user has played with the monitor resolution, it might be some random number. (But generaly in that range).

If the image is going to be printed, that is usualy a much higher DPI than the monitor - 300 and up. High quality linotype printers generaly start at 2500 DPI.

  • Comment on Re: Conversion Modules from Pixels to Millimeters

Replies are listed 'Best First'.
Re: Re: Conversion Modules from Pixels to Millimeters
by eserte (Deacon) on Apr 16, 2004 at 08:33 UTC
    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.

      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).