Example #1
0
        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);
        }
Example #2
0
        public override void Dispose()
        {
            base.Dispose();

            if (processor != null)
            {
                processor.Release();
                processor = null;
            }
        }