base for bitmap decoding