AccessImgExtract
HOWTO extract embedded images from an access database
Background
I was to extract a couple of hundred images embedded inside an access database.
The images was OLE inserted, we have to extract the image from the blob.
After searching the net after tools that were capable to extract images I found some script that used sendkey to
get the OLE responsible application to save the images. I didn't have the applications.
Windowsplatform and access database..
One solution AccessImgExtract.exe
- (1) access-database-filename
- Get the access-database filename, (*.mdb)
Only tested with the .mdb format, probably will not work on .accdb format
- (2) tablename inside the mdb-database
- Used to open the table inside the access database
- (3) database column, field to store the blob/active-x image
- This is used to access the right field
- (4) field with a counter or descriptive name for the image file
- Must be an uniqe name because the files wont be overwritten (=runtime error)
The file extension is selected by looking inside the blob and figuring out what kind of file it is.
(.pdf | .office | .dib | .jpg | .png | .psd | .cpt | .wmf | .tif | .gif | .psp | .bmp)
If it can't figure out the file-type it will use the extension .dmp
the .office file-type is used for all MS-office files, rename it after extraction
- (5) If you wish to filter the output, use a field to filter on and only matched rows in the access table will be processed.
- (6) Directory to store the output files
- Don't forget the trailing backslash
- (7) Dump content of BLOB to [file].dmp
- Don't look inside the blob trying to figure out what kind of it is, you can rename it after the extraction.
- (8) Go...
- Start the extraction
From database to image-files
- Place the access database on the machine with access installed (need DAO to access access)
- Extract bmp, jpg, gif, psd, psp, cpt, png, wmf, tif images with the tool. (also extract pdf and .office files)
- For other formats, drop me a line.
Filter
You can use a column in the database to filter on.
Set the field you wish to filter on.
The filter value will be used as follows:
- if the field is an integer, filter value is expected in the form low-high, example 100-200
- if the field is a string, filter value is part of the field values, *value*
Command Line
Usage: AccessImgExtract.exe [options] [mdb-filename]
where options include:
-t, --table=[table] | tablename inside database, (2)
|
-fi, --field-image=[field] | database column, field to store the blob/active-x image, (3)
|
-fn1=[field] | field with a counter or descriptive name for the image file, (4)
|
-fn2=[field] | filename can be made from 2 fields "field1 + field2"
|
-d, --dir=[directory] | directory to store the image files, (5)
|
-ff, --field-filter=[field] | field to filter on, default all
|
-fv, --filter-value=[value] | se filter section
|
-fd, --filter-dir | use filter field as sub-directory
|
Example:
AccessImgExtract -t=table -fi=images -fn=id -d=c:\temp\output c:\temp\file.mdb
- Default values are those saved when not using command line.
- Will only run if mdb-file exists
Download and go
Versions
- 2016-jul-21, version 0.18
- small tweaks, tested in windows 10
- 2015-dec-14, version 0.14
- priority for compound files moved to below raster images
- 2015-jul-31, version 0.13
- some more filetypes: dwg, wmf(ver 3.1), jp2, crw, img
- 2011-okt-27, version 0.12
- Small changes, Windows 7 etc
- 2009-okt-21, version 0.10
- Swapped order for the blob identification. pdf first (can include jpg etc)
- 2008-okt-05, version 0.9.8
- Command Line interface
- 2008-jul-08, version 0.9.7
- Fix for some dib's, buggfix for psp and bmp(v3-header).
- 2008-maj-22, version 0.8.5
- Minor fix to use field as folder name.
- 2008-maj-15, version 0.7
- Fix for pdf,office files. New filter function.
- 2008-apr-08, version 0.6
- Fix for GIF files
- 2008-feb-18, version 0.5
- Fix for PSD files
- 2006-mar-10, version 0.4
- Implement CPT7FILE, CorelPhotoPaint.Image.8, images
More info
if you like we can help you with extracting the files, or do it yourself with the above tool.
More info/questions from:
Subject: AccessImgExtract
Keywords: access,image,extract,aie,AIE,
jpeg,jpg,bmp,dib,cpt,paintshop,adobe,tif,tiff,images,process,export,png,gif,gif89a,gif87a,psd,psp,pdf,office,xls,doc,ppt
microsoft,access,database,embedded,files,
mdb,blob,activex