سؤال

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