modified smf height save function to use ImageBuf object