Harsha projects

Yet another Tech blog !

Image Display using WPF

leave a comment »

I have been working on image display using WPF.  After searching for a week, I found good examples. Here is the small list of examples with link.

1. Custom BitmapEffect Sample – RGBFilter.

The sample project from Microsoft is a nice example for image display. The Solution contains 3 project. First ATL COM dll project, where author creates and change the bitmap. Second, Wrapper for this COM DLL. Third, WPF Project. WPF Project is just a UI. But the problem is, COM DLL require registration.

RGB Filter Effect MSDN

Customer Bitmap Effect Sample


2. Revised BitmapEffect Sample Without DLL Registration.

I found one more example where DLL registration is solved.  Example looks same as MSDN example, but it is slightly different from the MSDN. So visit the link to download the example.


3.  Using WIC native APIs.

Author digs into BitmapSource and found that BitmapSource calls WIC native API’s for handling its buffer internally. So he build his own DLL and consumed in the WPF Application.


But there is one problem with example number 3. Image.Invalidatevisual is very slow(ofcourse author mentioned it).

Method 1 and 2 i.e., Bitmap effect sample, I guess they are getting performance because they uses display data inside, please correct me if I am wrong.

So, my search is on for finding best method or technology for displaying image. If you come across anything, please let me know.

Thanks for your time and thanks for visiting the blog.



Written by Harsha

June 16, 2010 at 4:30 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: