added support for masks of higher resolutions than the bitmaps they mask