0

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);
            }
        }
1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by mypicturefaded
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.