Hi, what is the difference of img.width and img.xsize? (reference manual 4.5.2 img.keys) For example, the cow.pdf gives me img.width = 18646779 and img.xsize = 18089984 What are the units? img.width is in sp, what about img.xsize? Patrick
On 29-11-2010 10:07, Patrick Gundlach wrote:
Hi,
what is the difference of img.width and img.xsize? (reference manual 4.5.2 img.keys)
For example, the cow.pdf gives me
img.width = 18646779 and img.xsize = 18089984
What are the units? img.width is in sp, what about img.xsize?
all units in luatex are scaled points the difference is some 8.4 pt which is somewhat weird \the\dimexpr18646779sp/\number\dimexpr1bp \the\dimexpr18089984sp/\number\dimexpr1pt that's pretty close so maybe the xsize (bounding box values) takes the wrong unit when conversion to sp takes place Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, 29 Nov 2010, Patrick Gundlach wrote:
what is the difference of img.width and img.xsize? (reference manual 4.5.2 img.keys)
For example, the cow.pdf gives me
img.width = 18646779 and img.xsize = 18089984
with a\directlua{ a = img.scan({filename = "cow.pdf"}) print("") print(a.xsize) print(a.width) img.write(a) } \bye i get This is LuaTeX, Version beta-0.65.0-2010112723 (rev 3990) restricted \write18 enabled. (./xx.tex 18089984 18089984 no difference!? Regards, Hartmut
On 29-11-2010 11:11, Hartmut Henkel wrote:
(./xx.tex 18089984 18089984
i get the same here so maybe patrick has a special mutated cow Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 29.11.2010 um 23:26 schrieb Hans Hagen:
On 29-11-2010 11:11, Hartmut Henkel wrote:
(./xx.tex 18089984 18089984
i get the same here so maybe patrick has a special mutated cow
no, just errors in his "don't write mails when tired" mode. Typical case of "Problem Exists Between Keyboard And Chair". I get the same widths here. Sorry everyone. Patrick
participants (4)
-
Hans Hagen
-
Hartmut Henkel
-
Patrick Gundlach
-
Taco Hoekwater