save image with metadata.