Display Blob as Picture?

T

Tom

Hi

I have saved some pictures (jpg format, not bmp) as blob in a microsoft
database. Now I'd like to display the blobs as picture. Is it possible to do
that?

Tom
 
E

Exponent

Assuming that the blob contains the raw binary data (and not an 'OLE Embedded' image) here are two possibilities.

on each record, extract the blob chunk by chunk (using a getchunk loop), write it to a temporary file,
then load the file into an image control. You'll need to ensure that the relevant Office Graphics Filters
are installed on each machine to display the image format. There are a couple of workarounds that may
be required for the image control ('scroll-too-quick' crash, and supress 'loading' dialog) - see 'The Access
Web' for more info:
http://www.mvps.org/access/

Alternatively you could consider a third party component, such as our DBPix image control, which you can
just bind to the Image field in the form's recordset, or load in code, for example:

DBPixCtrl.Image = rs("ImageField")
 
L

Larry Linson

"Tom" wrote
I have saved some pictures (jpg format,
not bmp) as blob in a microsoft
database. Now I'd like to display the
blobs as picture. Is it possible to do
that?

Yes it is, and that is one of three approaches to handling images in Access
that are illustrated in the sample databases you can download from
http://accdevel.tripod.com.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top