Why does this code result in a 1600x1600 image?

Does someone have an idea why the following code results in a 1600x1600 image?

 #set page(width: auto, height:auto, margin: 0pt)
 
 #grid(
   columns: (400pt, 400pt),
   image("BE-1.1-Antwort-Wetter.jpg"),
   image("BE-1.2-Antwort-Finanzmärkte.jpg"),
   image("BE-1.3-Antwort-Asteroid.jpg"),
   image("BE-1.4-Antwort-Pendel.jpg"),
 )

I would have thought, that it would result in an 800x800 image, since all the images are square and have a larger resolution than 400x400.

EDIT
I just realized that pt are not pixels but points. I don’t really understand how they relate but in my specific example they seem to relate in a 2:1 px:pt ratio.

A point is a unit of length measuring 1⁄72 of an inch. When exporting to PNG, Typst uses a default pixel density of 144 pixels per inch. Since there are 72 pt in an inch and 144 is twice that, the resulting image’s dimensions will be twice as many pixels as points.

3 Likes