fix making mask image