views:

132

answers:

1

I have a C# application that recolors an image using ColorMatrix. I understand that ColorMatrix doesn't make use of the GPU. What would be the best avenue to explore if I wanted to use the GPU to recolor the image? Pointers to where look in any suggested libraries would be appreciated, examples even more so!

+2  A: 

What you're searching for are call Pixel Shaders, they are tiny routines that are executed in parallel on each pixel of a given texture/image by the GPU. Since you're using C#, you can use WPF that allows pixel shaders to be applied on any element. Here's a lib on Codeplex that includes many shaders like making a monochrome or a negative image.

If you don't plan on using WPF which might be 'overkill' if you only intend to do image processing, starts using technologies like Direct3D, OpenGL or the recent Direct2D to apply with ease pixel shaders on a rendering target.

Julien Lebosquain