[Dev-luatex] How to crop bitmap images

Patrick Gundlach patrick at gundla.ch
Mon Jul 1 14:59:10 CEST 2013


Am 01.07.2013 um 14:32 schrieb Hans Hagen <pragma at wxs.nl>:

> On 7/1/2013 1:51 PM, Patrick Gundlach wrote:
>> Hi,
>> 
>> I'd like to crop a bitmap image. How? This is my code for image inclusion:
>> 
>> -------
>> \directlua{
>>   image = img.scan{filename="hacker.jpg"}
>>   tex.box[0] = node.hpack(img.node(image))
>> }
>> 
>> \box0
>> -------
>> 
>> bbox{...} seems to work only with PDF images.
> 
> use the pdf clip operator i.e. set a path with 'l' and 'm' and then apply the operator 'W n'

where?

I mean, what is a good place to put the pdf instructions?

Patrick






More information about the dev-luatex mailing list