public override void Dispose() { base.Dispose(); if (processor != null) { processor.Release(); processor = null; } if (blur != null) { blur.Release(); blur = null; } }
public WarpNode(int w, int h, GraphPixelType p = GraphPixelType.RGBA) { Name = "Warp"; Id = Guid.NewGuid().ToString(); width = w; height = h; intensity = 1; tileX = tileY = 1; previewProcessor = new BasicImageRenderer(); processor = new WarpProcessor(); blur = new BlurProcessor(); internalPixelType = p; input = new NodeInput(NodeType.Gray | NodeType.Color, this, "Image Input"); input1 = new NodeInput(NodeType.Gray, this, "Grayscale Gradients"); output = new NodeOutput(NodeType.Gray | NodeType.Color, this); input.OnInputAdded += Input_OnInputAdded; input.OnInputChanged += Input_OnInputChanged; input.OnInputRemoved += Input_OnInputRemoved; input1.OnInputAdded += Input_OnInputAdded; input1.OnInputChanged += Input_OnInputChanged; input1.OnInputRemoved += Input_OnInputRemoved; Inputs = new List <NodeInput>(); Outputs = new List <NodeOutput>(); Inputs.Add(input); Inputs.Add(input1); Outputs.Add(output); }
public BlurNode(int w, int h, GraphPixelType p = GraphPixelType.RGBA) : base() { Name = "Blur"; Id = Guid.NewGuid().ToString(); tileX = tileY = 1; width = w; height = h; intensity = 10; internalPixelType = p; previewProcessor = new BasicImageRenderer(); processor = new BlurProcessor(); input = new NodeInput(NodeType.Color | NodeType.Gray, this, "Image Input"); Output = new NodeOutput(NodeType.Color | NodeType.Gray, this); Inputs.Add(input); Outputs.Add(Output); }