saveFrame function using background image and p3d

Did you try to place this line at the end of draw() please