Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manipulate images at the pixel level in C#

How do I manipulate images at the pixel level in C#?

I need to be able to read/modify each bitmap pixel RGB values separately.

A code sample would be appreciated.

like image 263
Kamil Zadora Avatar asked Oct 10 '08 07:10

Kamil Zadora


1 Answers

If you want speed, then LockBits. See here for a good walkthrough by Bob Powell. If you just want to edit a few, then GetPixel/SetPixel should do what you want.

like image 93
Marc Gravell Avatar answered Sep 25 '22 15:09

Marc Gravell