Problem inserting image within MP

Hello, this is a probably basic question, but the following code doesn't compile: ---- \setupbackgrounds[page][background={Bkg}] \defineoverlay[Bkg][\useMPgraphic{Bkg}] \startuseMPgraphic{Bkg} externalfigure "hacker.png"; \stopuseMPgraphic \starttext Ahoj \stoptext ---- with: "
I just want to insert a picture from within MP code. What am I doing wrong? Best regards, Lukas

On Thu, 10 Oct 2019, context@vivaldi.net wrote:
Taco has already answered the question, but if you just want to insert the image as a background, there is no need to do so via MP. The following also works: \setupexternalfigures[location={local,global,default}] \setupbackgrounds[page][background={Bkg}] \defineoverlay[Bkg][{\externalfigure[hacker.png][width=\overlaywidth, height=\overlayheight]}] \starttext Ahoj \stoptext Aditya
participants (3)
-
Aditya Mahajan
-
context@vivaldi.net
-
Taco Hoekwater