added UIImage mask functions