6

I'm fuzzy on the relationship between Windows Imaging Component (WIC) and GDI+. I've done some work in the past that showed that, for example, WIC produces visually superior GIF encodings, but I'm surprised I don't see more people using it for image processing vs. GDI+. I know it doesn't have GDI+'s draw operations, but for encoding/decoding it seems superior. So why don't we see a migration?

Jeff Stewart
  • 803
  • 1
  • 8
  • 14

2 Answers2

5

The relationship (or rather the difference between) WIC and GDI+ is that WIC is an extensible imaging codec framework which allows applications implementing the framework to receive support for new image formats via provided codecs. GDI+ is a core component of Windows which supports draw operations such as lines, fonts, gradients, etc.

While GDI+ has native support for several common image formats, WIC codecs can be provided for any image format.

Jim H.
  • 5,539
  • 1
  • 24
  • 23
  • So other than some native encoding/decoding, WIC doesn't really do anything except offer a framework for writing more code? For such a superior set of native codecs (compared to GDI+), you'd think they'd have provided a better bridge between GDI+ and WIC. – Jeff Stewart Mar 03 '09 at 14:35
  • 1
    I'm researching this a bit more, and there seems to be a little more to it than that. WIC is an underpinning of most of what WPF does (see http://blogs.msdn.com/dwayneneed/archive/2008/06/20/implementing-a-custom-bitmapsource.aspx), and indeed WIC seems to manage pixels just as GDI+ does. – Jeff Stewart Mar 03 '09 at 15:25
0

I understood that GDI+ uses WIC to perform certain tasks. At least, in Windows 7 it does.

Please consider the following code:

image.Write(target, ImageFormat.Gif);

When I run this code under Windows XP it will use the GDI+ Gif encoder to write the image as a Gif. When I run the same code under Windows 7 it will use the WIC Gif Encoder.

Corne
  • 646
  • 1
  • 6
  • 19