OK, I modified a bit of code that I used several years ago ... it needed to be updated anyway ... I could have changed the code a bit to add additional error checking, but I decided against it ...
My code was modeled after a VBA utility designed to read the bitmap and write it to a usercontrol pixel by pixel. I don't remember the original source (it has been too many years) so if anyone knows who it is, let me know and I'll be happy to credit them with the idea.
Anyway, I have updated it to read the thumbnail information and put it into a bitmap object that can be assigned to any control where an image is required. i.e. a picturebox, frame, form etc. I have also added the ability to toggle the background color from the default white in the thumbnail to black (and vice versa) and the ability to save the file if desired.
The usage is very simple ...
This will load the bitmap from the file in FileName and will set the backcolor to black.
Dim imgMyImage As Image
imgMyImage = acThumbnailReader.GetThumbnail(FileName, False)
Me.PictureBox1.Image = imgMyImage
Additional options:
'returns bitmap image exactly as it is in the file
imgMyImage = acThumbnailReader.GetThumbnail(FileName)
'returns bitmap image exactly as it is in the file
imgMyImage = acThumbnailReader.GetThumbnail(FileName, True)
'returns bitmap image with inverted backcolor
imgMyImage = acThumbnailReader.GetThumbnail(FileName, False)
'returns bitmap image exactly as it is in the file and saves it as a temporary file in %temp%
imgMyImage = acThumbnailReader.GetThumbnail(FileName, True, True)
'returns bitmap image with inverted backcolor and saves it as a temporary file in %temp%
imgMyImage = acThumbnailReader.GetThumbnail(FileName, False, True)
'returns bitmap image exactly as it is in the file and saves it to a specified file
imgMyImage = acThumbnailReader.GetThumbnail(FileName, True, True, SaveNameWithPath)
'returns bitmap image with inverted backcolor and saves it to a specified file
imgMyImage = acThumbnailReader.GetThumbnail(FileName, False, True, SaveNameWithPath)
Simply add the attached class to your VB.Net project
I would convert it to C#, but it is late ..maybe tomorrow