Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VB.NET GdipSaveImageToStream

VB.NET GdipSaveImageToStream

VB.NET GdipSaveImageToStream

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.

RE: VB.NET GdipSaveImageToStream

This link should give you everything you need:


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!

RE: VB.NET GdipSaveImageToStream

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)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close