added support for high-resolution dithering masks