0

I have an application written in VB6 and would like to know how I would display an image blob from postgres to VB6?

2 Answers 2

1

If the image blob is in one of several standard formats (BMP, JPEG, GIF, TIFF file format) you can use WIA 2.0 for this.

Get the blob as a Byte array, create a WIA.Vector object, assign the Byte array to the Vector.BinaryData property, then you can use the Vector.Picture property to retrieve a StdPicture object you can assign to an Image or PictureBox control.

Sign up to request clarification or add additional context in comments.

Comments

0

This code can help if the image can be loaded to a picture box. See the PictureFromByteStream() Function in Module1.bas

1 Comment

The linked code is hacky at best. Try [Load and save pictures to byte arrays][1] for the IPersistStream way. MS Access is using this when pasting images in BLOBs. [1]: mvps.org/emorcillo/en/code/vb6/index.shtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.