You probably already found this in the manual:

bmap_to_mipmap(BMAP*)

cheers