Added API to change the userdata of an image.