Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.NET GdipSaveImageToStream

Status
Not open for further replies.

GhostWolf

Programmer
Jun 27, 2003
290
US
I've been tasked with creating an application to allow scanning of documents and saving them to a SQL Server database so they can be queried/reviewed on demand.

I've managed to modify code I've found online to scan the documents using GDI+, and successfully saved the scanned image to a file - but I really need to get it into a byte array.

The GdipSaveImageToStream appears to be what I need, but I don't know how to derive a pointer to the MemoryStream variable in VB.NET.

Any help/pointers would be greatly appreciated.
 
I apologize for my lack of clarity in my original post: I'm beginning with a scanned image. I'd seen that link earlier, and worked out how to retrieve the file and save the byte array - but I'd like to, (if possible), bypass the file step by going directly from the scanned image to the byte array. Unfortunately, I haven't the slightest idea how to derive a pointer to use in the second parameter, (target stream), of the GdipSaveImageToStream call.

GdipSaveImageToStream(pImg, pStream, ClassID, encParms)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top