c# - Performance of WriteableBitmapEx -


I am generating a full screen image with markers of 37000 or so I do the following code to do this

  Private Zero Drawmakers (Writable Bitmap Bitmap) {Writtenable Bitmap Marker = BitmapFactive.New (5, 5); Var source = new rack (0, 0, 5, 5); Marker Drylleps centric (3, 2, 2, 2, colored blue); Var s = stopwatch Startup (); Foreign Currency (different point in Transformed Point) {bitmap. Blit (new rake (int) dot.x, (dot) dot.a, 5, 5), marker, sourcearch); } S.Stop (); Console.light line ("Blating" + Transformed Point. Law + "Points" "+ S. Applied Millisecond +" MS ");}   

To throw these 37,000 points It takes about 203 ms on my Elitebook 8770W Windows 7. I have gone down to the illustration using standard WPF framework elements and now I have gone down from the writeable bitmap. On this set of markers I need a real-time zoom, so that Markers restored I need to say that to recover, I need about 50 mms for a redra.

The one I've read, the WriteableBitmap is the lowest level I will go. Next step in performance improvement What is it? It seems that it needs to be assigned to the GPU. How can I do this in C # or which library should I use?

Bitmap must use a big improvement To avail the concept concept, you do not lock and unlock all the time and avoid too many pixel copies.

  (using marker.GetBitmapContext (ReadWriteMode.ReadOnly)) (bitmap .GetContext)) {Foreach (different point in Transformed Point) {bitmap. Blit (new rick (dot) dot.x, (int. Point.a, 5, 5), marker, sosarite); }}}   

And if you do not need an alpha mixture, then you get blandcode. Should not give:

  bitmap.Blit (new rake (int) dot.x, (int) dot.a, 5, 5), marker, sourceract, blend mode.none;   
  • Reese

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -