7

I like GDI+ because its high performance and it's included with Windows XP. However, its blur class and effect class is only available in GDI+ 1.1, which only comes with Windows Vista or later. Despite the fact that Microsoft plans to drop support for Windows XP soon, there are still a large percentage of people who are still sticking with XP. If you make any consumer-targeted software, you have to support Windows XP. But unfortunately, GDI+ 1.1 is not redistributable under XP.

I tried a couple of opensource image libraries. However, when it comes to performance, for example, the gaussian blurring operation, they are significantly slower than gdi+.

Can anyone recommend a better alternative to GDI+ with XP support?

4

2 回答 2

3

我很惊讶您会发现GDI+ Blur 因其性能而具有吸引力。

请注意,与 GDI 的前身不同,GDI+ 不是硬件加速的(基于 CPU 的渲染) - 请参阅本文了解 XP、Vista、W7 上的 GDI/GDI+ 的一些详细信息,包括比较两者的一些基本渲染基准。

正如 Abdias Software 所提到的,WPF BlurEffect 是一个很好的解决方案,因为它使用 DirectX 进行渲染。

高性能高斯模糊的另一个选择是实现基于 GPU 的模糊(通过某些 GPU 加速 API 中的着色器,例如 OpenGL/GLSL、DirectX 或 Direct2D)例如:http://callumhay.blogspot。 com/2010/09/gaussian-blur-shader-glsl.html

于 2012-12-30T05:10:32.463 回答
2

GDI+ 已在Legacy graphics下排序。

MS 现在采用的替代方案是 Windows Presentation Foundation,简称 WPF。这在 XP 下也可用,并且比 GDI+ 性能更好。

或者就像我们过去所做的那样,从头开始编写代码(尽管它并不适合所有人)。或者作为替代方案,您可以通过锁定位图直接操作缓冲区并通过字节数组添加卷积或平均(用于模糊)。

注意:GDI+ 确实通过其 Matrix 类支持卷积。

还有更底层和高性能的DirectX 。

就我个人而言,我喜欢/更喜欢 GDI+,并在需要时使用缓冲区操作。我不担心这和 XP 会很快消失,即使 MS 放弃了它的支持。

于 2012-12-28T22:36:28.597 回答