Link to home
Start Free TrialLog in
Avatar of thandel
thandel

asked on

MS Access file size doubles when I add very small graphics embedded into reports

I am using MS Access 2003... we have a few (about 8 reports) that I had linked our logo within the report... the DB file size was about 50MB.  For various reasons I wanted to embed the 18KB graphic into each report.  After doing that the DB size increase over 2x to 110MB!  I tried:

- Compact and repair
- De compile and recompiling
- Creating a new DB and importing all my tables and forms

All had zero impact on the DB size.  I remove the embedded images and DB size was back down.

How can 8, 18KB image cause the DB to double in size!??!?!  Aside from linking is more efficient way to embed images aside from the graphical properties of the image as "embedded"?

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Anders Ebro (Microsoft MVP)
Anders Ebro (Microsoft MVP)
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This app is still available:
http://www.ammara.com/dbpix/access.html

It does what newer versions of Access do (Store images in a compressed format), ...but as a standalone utility.


Not sure what version started the more efficient handling of images (as Anders Ebro mentioned), ...but I think you can still get Office 2013 Pro for around 100USD...
You can see this web search as a start:
To test Anders comment, I took a 437KB .png and converted it to a .bmp with MS Paint.... at a whopping 1.83 MB size!
It pays to use the other image types if you're going to use more than 1 or 2.
Just 1 more reason to use newer versions of Access.
You posted a followup question on my profile which I can't reply to there, so I'll tag it onto here. You wrote:
One thing I don't follow... even if I convert this 18KB file to a BMP its only 120KB... still doesn't explain why it increased the DB 50MB.
I'm not sure. What BMP format did you choose? I belive Access uses 24 bit bmp (I.e. max color resolution), but I am not sure. If you used less that might explain it.
If you use the image in more than 1 place, you get the penalty once for each place it is stored.
Were you using an image control or OLE control (bound or unbound)?   If the later, Access wraps the object with an OLE wrapper so it knows how to work with it.  That adds a lot of overhead (doubles the size right off the bat), which is how the image control itself came about.   Access needed a lighter weight control for working with images.

 Beyond that, as Anders mentioned, later versions of Access were improved, adding a compression mechanistic and the ability to handle different graphic types.

One way around a logo in a reports and the way you should set it up is to store the logo in a "company" table, then use that as part of the reports recordsource or populate a control in code.  

Jim.
Another workaround is to create a single subreport and embed your image in it.  Then take all of the image controls out of the other reports and replace it with this sub-report.