Frage

I noticed that WPF has the System.Windows.Media(.Imaging) namespaces that contain a lot of the same functionality as System.Drawing(.Imagine), but I don't see an equivalent to the ColorMatrix in GDI+. I actually don't see a way of doing color transformations in general. Does one exist? I'm happy using GDI+ but was just curious.

War es hilfreich?

Lösung

WPF allows you to write custom pixel shaders. These are more versatile than a ColorMatrix which you could replicate as a pixel shader, plus they are executed on the GPU. Shazzam ships with some samples and simplifies the process of writing them.

Just to note: WPF is more suited for creating user interfaces than image editing, there's not much more than the members of System.Windows.Media.Imaging like WriteableBitmap and RenderTargetBitmap. If you are after bitmap image editing features gdi+ and Direct2D might be more appropriate.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top