For a Desktop Vista+ application that processes images, and is to be written in C#, which of the following technologies (or combinations_ would you recommend: System.Drawing (GDI+) vs System.Windows.Media vs Direct2D+DirectWrite+WIC. Image Processing will involve all kinds of primitive drawing, filling, working with text, rotations, translations, scaling, working with pixel data directly using pointers. In general, how good the above technologies work for manipulating bitmaps?
Also, if anyone knows of a good and detailed comparison chart that lists side-by-side different features and equivalents, as well as what is not supported, that would be great! For example, are there ColorMatrix equivalents in WPF and Direct2D? After investigating SharpDX's implementation of Direct2D, for instance, I was left with the impression that even though Microsoft positions it as a complete alternative to GDI+, I could not find all GDI+'s functionality in Direct2D.
Also, considering that it's 2014, would you say that at least for image manipulation (if not the UI part of things, where WPF seems to be a far better choice), GDI+ would be ok for the next 5 or so years? Or should I really consider using all 3 technologies where each works best?
Thank you.
I currently work in a visual-intensive C#/WPF project, and have done some hobbyst hacking with image processing in Python.
With your intended use, I would use the following approach:
System.Windows.Media
. As far as I know, System.Drawing
and GDI+ in general use unmanaged resources, and that could create undesired, avoidable problems;That way, for example, you could have an ImageLayerViewModel
class to represent a Layer, with a Data
property (or Value
or PixelArray
or Raster
, whatever) being a double[height,width,depth]
.
I could elaborate some more, but I'm not sure to be in the right track to answer your question, so write any comment if you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With