There are some GDI's objects to do some works with images in WPF, but these objects generate memory leaks easily and other errors (i.e MILERR_WIN32ERROR).

  1. What would be high level alternatives to do the same work without using GDI?
  2. Would be GDI bad for performance in a WPF application, once WPF uses DirectX beneath?
有帮助吗?

解决方案

What would be high level alternatives to do the same work without using GDI?

It really depends, but ideally, you'd do the work using WPF's api instead.

Would be GDI bad for performance in a WPF application, once WPF uses DirectX beneath?

There's always going to be extra conversion between WPF's image formats and System.Drawing, as WPF doesn't use GDI. This is going to cause some extra overhead to map back and forth.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top