write a xbm file to the buffer