Paste an image onto another image?

Alright, I’m answering my own question:

function compose(bg, fg, pos, angle)
	mask = Gray.(fg)
	mask[:] .= Gray(1)
	img = warp(fg, LinearMap(RotMatrix(deg2rad(angle))) ∘ Translation(pos...))
	mask = warp(mask, LinearMap(RotMatrix( deg2rad(angle) )) ∘ Translation(pos...))
	
	scene = copy(bg)
	scene[findall(mask .== Gray(1))] = img[mask .== Gray(1)]
	scene
end