public void LoadImage(String filename, bool isColor) { if (!System.IO.File.Exists(filename)) { throw new System.IO.FileNotFoundException(filename); } Release(); image = PInvoke.cvLoadImage(filename, isColor ? 1 : 0); CVUtils.CheckLastError(); created = true; }