[luatex] howto: scaling an image

Patrick Gundlach patrick at gundla.ch
Sun Mar 21 20:53:45 CET 2010


> When I load an image with img.new({filename=...}) I don't have access to the width/height or xsize/ysize before I turn the image into a node. Once it is a whatsit node, I have (as far as I understand) two alternatives:

I see that with img.scan I get the data, so I'd guess that just changing img.width and img.height should do it, right?

> 
> 1) wrap the image in a (scale_x 0 0 scale_y 0 0) matrix or
> 2) change the width or height and again turn the image into a node.
> 
> Which one is the preferred way?
> 


> Oh, an additional question: what are the units of the img.xsize and img.ysize table values?

This is still "open".

Patrick




More information about the luatex mailing list