Create image file (using C # or VB.NET) from Access OLE object column
Try using System.Drawing.Image.FromStream
to load an image. You can create a stream from a byte array withSystem.IO.MemoryStream foo = new System.IO.MemoryStream(MyByteArray);
Once the image is loaded, you can use whatever GDI stuff you want to keep (for example ImageInstance.Save(FileName);
)
a source to share
Create a byte array large enough to hold the OLE object:
Dim bArr(Len(<OLE Object Field>)) as Byte
Read in the first line of the column of the OLE object and put it in a byte array.
For a GIF file, bytes 0 through 2 will have the ASCII value "GIF". For a JPEG file, bytes 6 through 9 are usually "JFIF". For a PNG file, bytes 1 through 3 will have the ASCII value "PNG".
TIFF is more complex as there are so many different TIFF standards.
Once you have determined the file type, you can use Brian's method to save the file
a source to share