Aleff
Aleff

Reputation: 257

GDI/GDI+ in WPF applications: performance and good praticles

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?

Upvotes: 0

Views: 719

Answers (1)

Reed Copsey
Reed Copsey

Reputation: 564373

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.

Upvotes: 2

Related Questions