Helo all, I need help here code c# for windows phone.
just with C# on Windows Phone 7, I can't get value of pixel in image. I was creat code for get pixel value on Windows mobile 6 using VS2008 c# and still work but very slow, here my code.
private void button2_Click(object sender, EventArgs e)
{
Bitmap Ori = new Bitmap(pictureBox1.Image);
int X = Ori.Width;
int Y = Ori.Height;
string pesan = "Y :"+ Convert.ToString(Y)+ "X :"+ Convert.ToString(X);
MessageBox.Show(pesan);
for (int i = 0; i < X; i++)
{
for (int k = 0; k < Y; k++)
{
Color pix = Ori.GetPixel(i,k);
byte XY = (byte)((pix.R + pix.G + pix.B) / 3);
pix=Color.FromArgb(XY,XY,XY);
Ori.SetPixel(i,k, pix);
}
}
pictureBox1.Image=new Bitmap(Ori);
}
this code I am copy to vs 2010 exp for windows phone and not work.
anybody know, please give me solution
1. fast getpixel on windows mobile 6 with visual studio 2008 c#
2. fast getpixel on windows phone 7 with visual studio 2010 c#
thanks before & sorry for may bad english
[edit]Code block added - OriginalGriff[/edit]