How to set the alpha of an image

API docs says that SetAlpha() can only set the alpha of one pixel. I’ve also seen that SetAlphaData() on the Internet, but I didn’t find it in API docs.