public ChannelSwitchNode(int w, int h, GraphPixelType p = GraphPixelType.RGBA) : base() { Name = "Channel Switch"; Id = Guid.NewGuid().ToString(); width = w; height = h; redChannel = 0; greenChannel = 1; blueChannel = 2; alphaChannel = 3; tileX = tileY = 1; processor = new ChannelSwitchProcessor(); previewProcessor = new BasicImageRenderer(); internalPixelType = p; input = new NodeInput(NodeType.Color | NodeType.Gray, this, "Input 0"); input2 = new NodeInput(NodeType.Color | NodeType.Gray, this, "Input 1"); output = new NodeOutput(NodeType.Color | NodeType.Gray, this); Inputs.Add(input); Inputs.Add(input2); Outputs.Add(output); }
public override void Dispose() { base.Dispose(); if (processor != null) { processor.Release(); processor = null; } }