I need to be able to validate if a JPEG image is valid and not corrupted. This is not the same as question 210650 which just asks wants to validate that it is, in fact, a JPEG image. Loading from Image with validation eg:
var testJpg =
Bitmap.FromStream(filename, useEmbeddedColorManagement, validateData);
will not throw an exception for clipped images. Currently our solution is to try to open the file an external GD script and parse for any errors thrown from gdImageCreateFromJpeg.
gdImagePtr im;
im = gdImageCreateFromJpeg(testFile);
fclose(in);
But there has to be some .Net code somewhere that validates that a JPEG is not only valid, but contains the complete image?