Procedurality.Channel.channelBlend C# (CSharp) Method

channelBlend() public method

public channelBlend ( Channel channel, Channel alpha ) : Channel
channel Channel
alpha Channel
return Channel
		public Channel channelBlend(Channel channel, Channel alpha) {
			for (int y = 0; y < height; y++) {
				for (int x = 0; x < width; x++) {
					float alpha_val = alpha.getPixel(x, y);
					putPixel(x, y, alpha_val*channel.getPixel(x, y) + (1 - alpha_val)*getPixel(x, y));
				}
			}
			return this;
		}
	

Same methods

Channel::channelBlend ( Channel channel, float alpha ) : Channel