Imbedded picture makes big mde

  • Thread starter Thread starter Frida
  • Start date Start date
F

Frida

I have an Image control with a picture.

The picture is 202 KB, the database (.mde) is 1448 KB when
the picture is linked.

When embedded - the .mde file grows to 9224 KB....

Why is that?

I distribute my .mde, so it is a lot easier when the
picture is imbedded.
 
If you use 'OLE Embedding' the images are often stored uncompressed, and can cause an overhead of up to
200 *times*.

You can 'Embed' the pictures as raw-binary (blob) data and avoid this and other problems, or alternatively
work with external files.

Additional info and detailed comparisons of storage requirements are available in the articles below:

http://www.ammara.com/articles/imagesaccess.html
http://www.ammara.com/articles/accesspictureole.html

--
______________________________________________________

http://www.ammara.com/
Image Handling Components, Samples, Solutions and Info
DBPix 2.0 - lossless jpeg rotation, EXIF, asynchronous
 
1) Copy the PictureData prop of the Image control(s) to your Long Binary
OLE field.
Assuming a binary field(not control name!) named "Binary" then use code
like:
Me.Binary = Me.ImageControMaster1.PictureData

or
If the Compressed Image is simply too large uncompressed then:
2) Copy the contents of the original compressed image file(s) as is
directly into your long binary OLE field.
a) Read the entire file into a byte array.
b) Copy the byte array into the binary field.

When you need the image data you would have to:
c) Copy the contents of the binary field out to a temp disk file.
d) Load the temp disk file into the Picture prop of the Image control.






--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top