Fix seg fault error by only supporting BMP.