Click here to Skip to main content
15,992,761 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Bitmap bm = new Bitmap(sourceFilename);
for (i = 0; i < bm.Width; i++)
{

for (j = 0; j < bm.Height; j++)
{

Color pixelColor =
a=(pixelColor.R ;

b=(pixelColor.B );
c=(pixelColor.G );

}
}

a,b,c values have to be copied in a 2 dimesional array for each pixel..suppose..there are 100 pixels..each 10 in one row...when we take rgb values for each pixel..we have 300 in each row...

so iwill be 300X100 2d array where rows are 100 and columns are 300
Posted
Comments
Kenneth Haugland 29-Apr-13 5:31am    
WinForm or WPF?
luckycode 29-Apr-13 6:39am    
forms application

1 solution

You may use the Bitmap.Lockbits method, MSDN provides a code sample[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900