directly return the generated image, fixes #2