support BMP. Closes #632