[TAG] A script for editing a config file
kh1 at khherrmann.de
Sun Nov 6 14:01:31 MSK 2005
On Sun, 6 Nov 2005 10:44:24 +0100
G?bor Igl?i <mdjake at gmail.com> wrote:
> However again it is suspicious that the DisplaySize values described
> on that Ubuntu thread works the same for various types of monitors (I
> tested them with 17" tft, 17" crt too - and these have definately
> different physical screen geometry).
I observed a rather weird behavior a while back on one system:
We attached a huge SUN cRT with a wider than 4:3 aspect ratio to one of
the Linux boxes. Unfortunately I was not able to talk, presure or
blackmail iX into using anything else besides 4:3 VESA modes. The rather
dirty solution was a 4:3 resolution and massive adjustment on the
monitor. The pixels on screen are therefor definitely *not* sqaure and
the actual dpi is not the same in x and y direction.
That was quite ok until we used gimp to export an image in jpg or png
and import it into LaTeX. In LaTeX it showed up distorted (aspect).
Tracking this suggest that gimp actually gets the dpi from X (can be set
in config as well) and uses this when exporting (at least for png). With
an assymmetric dpi resolution other programs aware of this try to
correct for the assymmetry. To make this clear: The image has a certain
x and y pixel size. But pdfLaTeX on import of a png file checks the
resolution infomation set in the png (might also be switched off in png
export for gimp I guess) and adjusts the aspect ratio according to this
resolution dpi from the png header instead of displaying the file 1:1 by
Right now we are aware of this but haven't played around with settings
in gimp. ImageMagick/convert is IIRC ignoring these kind of settings.
A new TFT monitor is planned before end of the year and that makes it a
rather academic problem for me.
> BTW I liked very much your math derived from the Pythagoras' equation.
> I used to actually measure my screen with a tape-measure :).
> I admit that I am a bit confused now by the complexity of X and dpi
> and have to take a second read. Is there a tool instead of xdpyinfo
> that actually measures the REAL dpi?
In our case the monitor somehow *told* X the physical geometry -- which
was then reported to gimp and xdpyinfo should be able to show this too.
In what way applications are actually using this information (and make
it thereby relevant for sometihng) I don't know (besides the gimp
In gimp you would find these settings when you have an image and use
image->scale image -- there you'll find a resolution setting which is
usually symmetric (same res in x and y).
More information about the TAG