As I said in another question, the file including its extension written by your
SampleGrabberCallback::BufferCB is invalid, although it's valid for
I found the related thread which said
You don't use a BITMAPINFOHEADER for a JPEG image, and you certainly don't save them to a .BMP. It's a JPEG. You just copy the bits to file and make the extension .JPG. As long as the first two bytes are FF D8, that should be all it takes.