Beispiel #1
0
        protected Frame RenderFrame(long frameIndex)
        {
            var frame = this.Source.Filter.GetFrame(frameIndex);

            var bitmap = frame.Video[0];
            var output = new NSynth.Imaging.BitmapRGB(bitmap.Height, bitmap.Width); // invert order of width and height.

            // simple clockwise rotation 90 degrees.
            for (int y = 0; y < bitmap.Height; ++y)
                for (int x = 0; x < bitmap.Width; ++x)
                    output[y, x] = new NSynth.Imaging.ColorRGB(bitmap[x, y]);

            return null; // some other stuff to do before returning a real frame.
        }