Example #1
0
        internal static void Main(string[] args)
        {
            var input = new TGASourceFilter(@"P:\nsynth\framedumps\avatar\avatar{0:000000}.tga");

            input.MultiFrame = true;
            input.ImageCount = 70;
            //input.FrameCount = 70000;
            input.InitializeClip();

            var writer = new TGAOutputFilter(@"C:\Temp\nsynth\avatar_out\avatar{0:000000}.tga");

            writer.Source.Bind(input);

            writer.GetFrame(0);
            Console.WriteLine(GC.GetTotalMemory(true));
            Console.ReadLine();
        }
Example #2
0
        private void ShowTGASample(object sender, EventArgs e)
        {
            var path = ((MenuItem)sender).Tag as string;

            var sw = new System.Diagnostics.Stopwatch();

            sw.Start();
            var tgaSource = new TGASourceFilter(@"C:\Temp\NSynth\avatar\avatar{0:000000}.tga");

            tgaSource.MultiFrame = true;
            tgaSource.InitializeClip();

            //var blur = new BlurFilter(1);
            //blur.Source.Bind(tgaSource);

            //var flip = new FlipFilter()
            //{
            //    FlipDirection = FlipDirection.Horizontal
            //};
            ////flip.Input.Bind(filter);
            //blur.Initialize();

            //flip.Initialize();
            //this.host.Filter = flip;
            this.host.Filter = tgaSource;
            int n = 300;


            for (int i = 80; i < 100; ++i)
            {
                this.host.DisplayFrame(i);
                //System.Threading.Thread.Sleep(100);
            }

            sw.Stop();
            this.Title = string.Format("NSynth Graph Studio -- Sample displayed in {0}ms", sw.ElapsedMilliseconds);
        }