What's the relationship between WIC and GDI+?

跟風遠走 提交于 2019-12-07 02:50:44

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/602727/whats-the-relationship-between-wic-and-gdi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!