What is the equivalent of LaTeX's "\includegraphics*[scale = 0.3, trim = 0 100 0 200"]{tiger.png}?

Hi @pejef,

I’m not exactly sure what this LaTeX command does, but if you want to scale an image based on its size, you could measure the image’s dimensions and use the scaled measured size as the image’s width/height.


#let scale(scale: 1.0, img) = context {
  let size = measure(img)
  set image(width: size.width * scale)
  img
}

#scale(scale: .3, image("test.png")) 

“Trim” can be emulated by enclosing the image with a box and using inset and clip.

#box(clip: true, inset: (left: -2cm), image("test.png"))
2 Likes