I swear this code worked a few minutea ago...but now it is coming up with the Parameter is not valid error. What am I missing here?
sigpic is a public local variable.
private void SaveFile(string fileName, byte[] bytes)
{
//MessageBox.Show("Saving file '" + fileName + "' of length " + bytes.Length + " bytes");
try
{
using (FileStream file = new FileStream(fileName, FileMode.OpenOrCreate))
{
//MessageBox.Show(file.Name);
//file.Write(bytes, 0, bytes.Length);
sigpic = Image.FromStream(file);
file.Close();
}
}
catch (Exception e)
{
MessageBox.Show("Save error: " + e.Message);
}
}