Hi All,
please I have a file which i want to read it binary data using the datalength and offset and save into a database. I am using the code below but it seems not to be working.
Can anyone help me get it working or an idea on how to achieve this
byte[] allBytes = File.ReadAllBytes(imgFile);
ArrayList buffer = new ArrayList();
int bufferLen = 0;
byte[] newAllBytes = new byte[1];
int FrontImageLength = int.Parse(FIL.ToString());
int FrontImageOffset = int.Parse(FIO.ToString());
byte[] imageBytes = new byte[FrontImageLength];
for (int j = 0; j <= FrontImageLength - 1; j++)
{
imageBytes[j] = allBytes[FrontImageOffset + j];
}
Bitmap bitmap;
using (MemoryStream ms = new MemoryStream(imageBytes))
{
bitmap = new Bitmap(ms);
FImage.Text = bitmap.ToString();
}
Thanks in advance
Go to the complete details ...