Alternative for GDI +

I like GDI + because its high performance and it is included in Windows XP. However, the blur class and effect class are only available in GDI + 1.1, which comes only with Windows Vista or later. Despite the fact that Microsoft soon plans to abandon support for Windows XP, there remains a large percentage of people who still adhere to XP. If you are producing consumer-oriented software, you need to support Windows XP. But unfortunately, GDI + 1.1 does not apply to XP.

I tried several open source image libraries. However, when it comes to performance, such as the Gaussian blur operation, they are significantly slower than gdi +.

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

+6
source share
2 answers

I am surprised that you found GDI + Blur to be attractive based on its performance.

Note that unlike its predecessor, GDI, GDI + is not hardware accelerated (CPU-based rendering) - see this article for some GDI / GDI + details on XP, Vista, W7, including some basic rendering tests comparing them.

As Abdias Software mentions, WPF BlurEffect is a good solution because it uses DirectX for rendering.

Another option for high-performance guas blur is the introduction of GPU-based blur (via a shader in some APIs with GPU acceleration, for example OpenGL / GLSL, DirectX or Direct2D) For example: http://callumhay.blogspot.com/2010/09/gaussian-blur -shader-glsl.html

+3
source

GDI + is already sorted under outdated graphics .

Alternative MS now covers Windows Presentation Foundation or WPF for short. It is also available under XP and has better performance than GDI +.

Or, as we did in the old days, write code from scratch (this is not for everyone, though). Or, alternatively, you can manipulate the buffers directly by locking the bitmap and going through the byte array to add convolution or averaging (as used for blurring).

As a side note: GDI + supports convolution through its Matrix class.

There is also DirectX , which is lower-level and high-performance.

Personally, I like / prefer GDI + and use buffer manipulation when necessary. I am not worried that this XP will not disappear in the near future, even when MS refuses to support it.

+2
source

All Articles