Hi,

Working on converters, I had some ugly behavior with image rendering.

It appears that, inserting an image into TeXmacs leads, by default to a
bad typesetting because the image is stretched by a factor approx 5/3.

To reproduce it, copy paste :

<image|http://upload.wikimedia.org/wikipedia/meta/6/6d/Wikipedia_wordmark_1x.png||||>

In typeset_image () in src/Typeset/Concat/concat_active.cpp, I don't
understand the line 318 :
 double pt= ((double) env->dpi*PIXEL) / 72.0;

i)   env->dpi is related to font's DPI and I don't know why should it
     imply image resizing.
ii)  I wonder if magnification should not play a role here. 
iii) I suppose that PIXEL is the ratio tmpt / px.
iv)  If we should translate the size from pixels to tmpt, I wonder why
     the calculus "pt= PIXEL * zoom_factor", following the
     documentation (length.en.tm), is wrong (at least, it gives a
     result very different than the current result).
v)   By the way, current calculus on my computer gives pt= 2133.33,
     (with default DPI= 600 and PIXEL= 256) whereas the "wanted size"
     of the picture is obtained with a pt approx 1280.

Any suggest about this ?
François

-- 
François Poulain <[email protected]>

_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to