views:

64

answers:

1

Is there an efficient way to take and image and be able to replace a given color with another given color using .NET Compact Framework?

For example, to replace white with black or vice versa?

A: 

Using the Imaging API, you can get an IBitmapImage, lock the image data bits, loop over the bits via the BitmapData* and change the pixels of your choice.

Edit: I just noticed the NETCF tag, but I leave this answer for reference.

Johann Gerell