Generating a new background for an image