I have a problem. I need to fill (or repaint) some pixels at image, stored in Image control. This is a png image. I mean, that all black pixels should be filled with, for example, red color. How can I do this? I thought I can access directly to pixels and using XOR change special bits, but I don't know how to do this. Or maybe there is an easier way?
Asked
Active
Viewed 4,544 times
1 Answers
3
The GetPixel
and SetPixel
methods should work for what you need.
This answer has a code sample that you should be able to adopt for your use.
-
Thank you, It works. I'm using WPF, but I've understood, what to do - just create BitmapSource from Bitmap, using Interop – Ivan Oct 27 '11 at 20:51