What's the relationship between WIC and GDI+?
Asked Answered
S

2

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?

Sihun answered 2/3, 2009 at 15:23 Comment(0)
W
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.

Whop answered 3/3, 2009 at 1:10 Comment(2)
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.Sihun
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 blogs.msdn.com/dwayneneed/archive/2008/06/20/…), and indeed WIC seems to manage pixels just as GDI+ does.Sihun
C
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.

Chief answered 19/8, 2009 at 12:2 Comment(1)
there is not Image.Write(...).You probably mean Image.Save(...)Synder

© 2022 - 2024 — McMap. All rights reserved.