public static bool IsImageFile(string file) { bool isImageFile = false; if (FileManager.FileExist(file)) { try { if ((new Bitmap(file)) != null) isImageFile = true; } catch { } } return isImageFile; }It creates a new Bitmap() so if it is a big image the method should be very slow, and I only want to check it.