This function converts the alpha channel of an image layer into a mask. If there was already a mask, it is replaced without further request.