How to get embedded OLE objects out

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

The database I am working with has lot's of graphic files embedded in the
database as OLE objects. Apparently this takes up LOTS of space. I was
thinking that if there was an easy way to extract the files to a folder, a
link to the file might free up some space. I have two questions pertaining
to this:

1. Will be more space-effective to remove the files from the database and
move them to a separate folder.
2. Does anybody have a tidbit of code that might help me get started with
saving the object to a folder?

Thanks in advance for your help,
Aaron
 
There are several ways to store images in OLE Object fields. If you have used 'OLE Embedding', it is quite
possible/likely that you will save space by using a different approach. A firm answer depends on the type
(and compression) of the source files, and the particular 'OLE server' application that was used to 'embed'
the image in the database. We have seen overhead of close to 200 *times* the size of the original file
in particular circumstances.

The main alternatives are to work with images in the filesystem, or images in the database (as raw-binary/blob
data, which has little or no overhead compared with the filesystem).

Either way, you first need to get the OLE Embedded images out. MSDN contains information on extracting
a bitmap from OLE objects. Stephen Lebans provides an implementation that also offers the possibility
to re-compress the extracted bitmap to JPEG. Our own image control also has this capability.

Larry Linson's imaging samples contain a code solution to raw-binary/blob imaging (by extracting to temporary
file and loading into an Access Image control). Our image control can also be bound directly to binary
fields (requiring no code) and offers a range of useful extra capabilities, such as lossless jpeg rotation,
asynchronous decoding, EXIF info viewer, resampling etc.

Some additional info on OLE Embedding vs raw-binary/blob storage is available here:
http://www.ammara.com/articles/imagesaccess.html

Stephen and Larry's sites are available via our links page (see url in sig). If it is of interest our
own image control is also available here, along with information, samples and solutions on imaging in Access.
 
Thanks for the great information!

I have been working with the linked method, however I have not figured out
how to display linked files in a report. Do you have any insight on this?

Thanks again for your help,
Aaron


exponent said:
There are several ways to store images in OLE Object fields. If you have
used 'OLE Embedding', it is quite
possible/likely that you will save space by using a different approach. A
firm answer depends on the type
(and compression) of the source files, and the particular 'OLE server'
application that was used to 'embed'
the image in the database. We have seen overhead of close to 200 *times* the size of the original file
in particular circumstances.

The main alternatives are to work with images in the filesystem, or images
in the database (as raw-binary/blob
data, which has little or no overhead compared with the filesystem).

Either way, you first need to get the OLE Embedded images out. MSDN
contains information on extracting
a bitmap from OLE objects. Stephen Lebans provides an implementation that also offers the possibility
to re-compress the extracted bitmap to JPEG. Our own image control also has this capability.

Larry Linson's imaging samples contain a code solution to raw-binary/blob
imaging (by extracting to temporary
file and loading into an Access Image control). Our image control can
also be bound directly to binary
fields (requiring no code) and offers a range of useful extra
capabilities, such as lossless jpeg rotation,
asynchronous decoding, EXIF info viewer, resampling etc.

Some additional info on OLE Embedding vs raw-binary/blob storage is available here:
http://www.ammara.com/articles/imagesaccess.html

Stephen and Larry's sites are available via our links page (see url in
sig). If it is of interest our
own image control is also available here, along with information, samples
and solutions on imaging in Access.
 
Think I got it figured out. No post necessary.


Aaron said:
Thanks for the great information!

I have been working with the linked method, however I have not figured out
how to display linked files in a report. Do you have any insight on this?

Thanks again for your help,
Aaron


have
used 'OLE Embedding', it is quite A
firm answer depends on the type
application that was used to 'embed' *times*
the size of the original file images
in the database (as raw-binary/blob
contains information on extracting that
also offers the possibility raw-binary/blob
imaging (by extracting to temporary
also be bound directly to binary
capabilities, such as lossless jpeg rotation,
sig). If it is of interest our samples
and solutions on imaging in Access. folder,
 
Back
Top