First mask bitmap, then compare