free memory of raw image.