public GrayscaleConversionNode(int w, int h, GraphPixelType p = GraphPixelType.RGBA) { Name = "Grayscale Conversion"; Id = Guid.NewGuid().ToString(); width = w; height = h; r = 1; g = 1; b = 1; a = 0; tileX = tileY = 1; previewProcessor = new BasicImageRenderer(); processor = new GrayscaleConvProcessor(); internalPixelType = p; input = new NodeInput(NodeType.Color, this); Output = new NodeOutput(NodeType.Gray, this); input.OnInputAdded += Input_OnInputAdded; input.OnInputChanged += Input_OnInputChanged; input.OnInputRemoved += Input_OnInputRemoved; Inputs = new List <NodeInput>(); Inputs.Add(input); Outputs = new List <NodeOutput>(); Outputs.Add(Output); }
public override void Dispose() { base.Dispose(); if (processor != null) { processor.Release(); processor = null; } }