Fix bitmap mode support
Merge pull request #6 from yuezhao/master

Fix bitmap support