Converts this image to a ui.Image. The caller is responsible for calling ui.Image.dispose() on the returned image.