bitmap support refactor