Isn't this equivalent to
Lua Code:
texture:SetMask([[Interface\CharacterFrame\TempPortraitAlphaMask]])
...except you get an actual reference to the alpha mask?
Curious about the wrap mode, though. Iirc, providing the means of using custom, non-native textures as masks for other things than the minimap was on the to-do list.