Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why size of .mdb growing three times with small image?

I made few forms in Access 2010 and I add logo of company to the header form. This picture is .jpg and size of it is 70KB. I don't know why size of .mdb immediately increased from 4MB to 12MB? (few forms and the same logo) Maybe there is some options of image compression ?

like image 772
mathewM Avatar asked Jun 11 '12 15:06

mathewM


1 Answers

Taken from http://office.microsoft.com/en-us/access-help/store-images-in-a-database-HP005280225.aspx

..."However, embedding images can rapidly inflate the size of your database and cause it to run slowly. This is especially true if you store GIF and JPEG files, because OLE creates additional bitmap files that contain display information for each of your image files, and those additional files can be larger than your original images. In addition, this method only supports the Windows Bitmap (.bmp) and Device Independent Bitmap (.dib) graphic file formats. If you want to display other common types of image files, such as GIF and JPEG images, you have to install additional software."...

To explain how these bitmap files are stored, the link below offers more explanation than the microsoft site:

Taken from http://www.ammara.com/support/kb/showkbe5cc.html

..."OLE Linking & Embedding is a technique used by Microsoft Access to store 'Objects' in database tables.The technique relies on the associated external application to store, present and edit the data. In some cases an additional uncompressed 'preview' image is also saved in the table (even when linking). This preview image is used for faster display of the data, or when the server application isn't available. This can cause a massive overhead. If you're storing jpeg images the uncompressed preview can be ten or twenty times the actual image size, causing the size of the database to rocket."...

So, when you drop an image onto a form in MS Access, uncompressed image data is saved to the system tables. This is actual uncompressed table data, so a compact and repair may offer little help.

The common workaround seems to be store the path to the image in a database table, and use that path to invoke the image on the form.

like image 99
EastOfJupiter Avatar answered Nov 15 '22 05:11

EastOfJupiter