コード例 #1
0
ファイル: ResizeTests.cs プロジェクト: vpenades/InteropTypes
        public void TestFlipPerformance(int w, int h, bool multiThread, bool hflip, bool vflip)
        {
            var bmp = new MemoryBitmap <Pixel.RGB24>(w, h).AsSpanBitmap();

            var mirrorEffect = new Processing.BitmapMirror(hflip, vflip, multiThread);

            using (PerformanceBenchmark.Run(t => TestContext.WriteLine($"{w}x{h} HFlip:{hflip} VFlip:{vflip} {Math.Round(t.TotalMilliseconds / 1000)}ms")))
            {
                for (int r = 0; r < 1000; ++r)
                {
                    bmp.ApplyEffect(mirrorEffect);
                }
            }
        }