Hi
I want to show the picture in a picturebox
picture is store as text in database table. my code is :
string bmpStr = "=Fields.Sign1";
int NumberChars = bmpStr.Length;
byte[] myBytes = new byte[NumberChars / 2];
for (int i = 0; i < NumberChars; i += 2)
{
myBytes[i / 2] = Convert.ToByte(bmpStr.Substring(i, 2), 16);
}
System.IO.MemoryStream ms = new System.IO.MemoryStream(myBytes);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
this.pictureBox2.Value = img;
Fields.Sign1 is coming from a database which store as text field in sql server but it is image
can any one help me in this please???
I want to show the picture in a picturebox
picture is store as text in database table. my code is :
string bmpStr = "=Fields.Sign1";
int NumberChars = bmpStr.Length;
byte[] myBytes = new byte[NumberChars / 2];
for (int i = 0; i < NumberChars; i += 2)
{
myBytes[i / 2] = Convert.ToByte(bmpStr.Substring(i, 2), 16);
}
System.IO.MemoryStream ms = new System.IO.MemoryStream(myBytes);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
this.pictureBox2.Value = img;
Fields.Sign1 is coming from a database which store as text field in sql server but it is image
can any one help me in this please???