strip out extra infos from the image