Microscale magnetic patterning of hard magnetic films using microfabricated magnetizing masks