anis
anis

Reputation: 1

How to display image blob from postgres to VB 6?

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

Upvotes: 0

Views: 1109

Answers (2)

renick
renick

Reputation: 3881

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

Upvotes: 0

Bob77
Bob77

Reputation: 13267

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.

Upvotes: 1

Related Questions