private static byte[] LoadImageData(string filePath)
{
try
{
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
byte[] imageBytes = br.ReadBytes((int)fs.Length);
br.Close();
fs.Close();
return imageBytes;
}
catch (System.Exception ex1)
{
TaskDialog.Show("Error!", "exception: " + ex1);
}
return null;
}