A bidirectional tool for working with images in databases. Extract images from various database formats or update images in XML databases.
- XML (.xml)
- Microsoft Access (.mdb)
- SQL Server (.mdf)
- SQLite (.sqlite3, .db)
- dBase (.dbf)
Extract images from databases into organized folders.
ImagesInDB.exe <directory1> [directory2] [...]ImagesInDB.exe C:\DataThe program will:
- Scan for database files in the specified directories
- Extract images from tables with byte[] or Base64 string columns
- Create folders named
DB_{filename}_Images - Save images with the naming pattern:
{tableName}_{columnName}_{rowIndex}.{ext}
Example output:
DB_products.xml_Images\Products_Image_01.jpgDB_products.xml_Images\Products_Thumbnail_02.png
Update images in XML databases from a folder of edited images.
ImagesInDB.exe --update-xml <xmlFilePath> <imagesFolderPath>xmlFilePath: Path to the XML database file to updateimagesFolderPath: Path to the folder containing updated images
Images must follow this pattern:
{tableName}_{columnName}_{rowIndex}.{extension}
Where:
tableName: Name of the table in the XML databasecolumnName: Name of the column containing the image datarowIndex: Row number (1-based, starting from 01, 02, 03...)extension: Image file extension (jpg, png, gif, bmp, tiff)
ImagesInDB.exe --update-xml C:\Data\products.xml C:\Data\DB_products.xml_Images-
Extract images from XML:
ImagesInDB.exe C:\DatabaseFolderCreates:
DB_products.xml_Images\Products_Image_01.jpg, etc. -
Edit the images using your preferred image editor
-
Update the XML database:
ImagesInDB.exe --update-xml C:\DatabaseFolder\products.xml C:\DatabaseFolder\DB_products.xml_Images
- JPEG (.jpg, .jpeg)
- PNG (.png)
- GIF (.gif)
- BMP (.bmp)
- TIFF (.tiff)
The tool supports:
byte[]columns: Images stored as binary datastringcolumns: Images stored as Base64-encoded strings
?? Important: The updater automatically preserves .NET Framework compatibility!
When running on .NET 8, the tool:
- Creates a backup of your XML file (
.backupextension) - Updates the image data
- Automatically converts .NET 8 assembly references back to .NET Framework 4.0 format
This ensures that XML files updated with this tool can still be read by:
- .NET Framework 2.0+ applications
- .NET Framework 4.x applications
- .NET Core 3.1+ applications
- .NET 5, 6, 7, 8+ applications
The tool automatically converts assembly references like:
<!-- .NET 8 format (incompatible with .NET Framework) -->
msdata:DataType="System.Guid, System.Private.CoreLib, Version=8.0.0.0, ..."
<!-- Automatically converted to .NET Framework format -->
msdata:DataType="System.Guid, mscorlib, Version=4.0.0.0, ..."Every update operation creates a .backup file. If something goes wrong:
- The original file is automatically restored from backup
- You can manually restore by renaming
yourfile.xml.backuptoyourfile.xml
- Row indexing in filenames is 1-based (01, 02, 03...) to match the extraction format
- The program searches recursively in the images folder
- Images with invalid filenames or mismatched table/column names will be skipped with a warning
- A backup is automatically created before any updates
- Schema compatibility with .NET Framework is automatically maintained