title: How to check if a jpeg image file is actually a valid image before trying to load?
body: <p>In <code>C#.NET 4.0</code>, based on a problem I had with downloading false images (saving an error aspx page as image.jpg instead of an actual image in image.jpg), I need to somehow read the file and identify if it is a valid image or not. I just need 1 function <code>public bool IsValidJpgImage(string ImageFilename);</code> Anything that returns false (is not a valid image file) I will delete from the disk.</p>