Stephen Cheng
Stephen Cheng

Reputation: 996

Alternative for GDI+

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?

Upvotes: 8

Views: 7315

Answers (2)

holtavolt
holtavolt

Reputation: 4468

I'm surprised that you find the GDI+ Blur to be appealing based on it's performance.

Note that unlike it's GDI predecessor, GDI+ is not hardware accelerated (CPU-based rendering) - see this article for some details of GDI/GDI+ on XP, Vista, W7, including some basic rendering benchmarks comparing the two.

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

The other option for high-performance Guassian blurring, is to implement a GPU-based blur (via a shader in some GPU-accelerated API, e.g. OpenGL/GLSL, DirectX, or Direct2D) For example: http://callumhay.blogspot.com/2010/09/gaussian-blur-shader-glsl.html

Upvotes: 3

user1693593
user1693593

Reputation:

GDI+ is already sorted under Legacy graphics.

The alternative MS embraces now is Windows Presentation Foundation, or WPF for short. This is also available under XP and has better performance than GDI+.

Or as we did in the old days, write code from scratch (it isn't for everyone though). Or as an alternative you can manipulate the buffers directly by locking the bitmap and go through the byte-array to add convolutions or averaging (as used in blurring).

As a note: GDI+ do support convolutions through its Matrix class.

There is also DirectX which is more low-level and high-performing.

Personally I like/prefer GDI+ and use buffer manipulation when seen needed. I am not worried that this nor XP will go away anytime soon even when MS drop its support.

Upvotes: 2

Related Questions