ImageMetadataTools is an open-source Wolfram Language paclet with a C++ backend (via LibraryLink) for reading and writing image metadata:
- EXIF (including MakerNote)
- IPTC
- XMP
The C++ layer connects to the Exiv2 library for metadata parsing; the paclet exposes a rich Wolfram Language interface which can be used either directly or through Import and Export functions.
ImageMetadataTools can be installed in Wolfram Language 15.0 or newer. The paclet will be downloaded and installed automatically when it is necessary for Import or Export.
To manually install a specific release, download it from the Github repo's releases page and run the following command in the Wolfram Language:
PacletInstall["/full/path/to/ImageMetadataTools.paclet"]This will permanently install the ImageMetadataTools paclet. The Wolfram Language will always use the latest installed version of ImageMetadataTools. Installed versions can be enumerated using the command:
PacletFind["ImageMetadataTools"]And all versions can be uninstalled using the command:
PacletUninstall["ImageMetadataTools"]Once installed, load the package and call functions:
In[1]:= Needs["ImageMetadataTools`"]
In[2]:= f = FindFile @ "ExampleData/coneflower.jpg";
In[3]:= ReadIptc::usage
Out[3]= "ReadIptc[file_] reads a nested Association of processed IPTC metadata from a file."
In[4]:= ReadIptc[f]
Out[4]= <|"Application2" -> <|"RecordVersion" -> 2|>|>
In[5]:= ReadExifTag::usage
Out[5]= "ReadExifTag[file_, tag_] reads a processed Exif value for a specific tag from a file."
In[6]:= ReadExifTag[f, "DateTime"]
Out[6]= DateObject[{2008, 8, 19, 11, 29, 5.}, "Instant", "Gregorian", None]To build ImageMetadataTools from sources, the following must be installed:
- CMake 3.25+
- git
- Wolfram App 15.0+ with wolframscript
- Exiv2 0.28+ (preferably installed from vcpkg)
- a C++ compiler supporting C++23 (e.g gcc 14)
Proceed as follows:
- Clone this project from GitHub
- Initialize submodules (
git submodule update --init --recursive) - Configure the CMake project in a build directory of your choice, with the following options:
-DWolframLanguage_INSTALL_DIR=<full path to Wolfram App>
-Dexiv2_DIR=<full path to Exiv2 installation>If you are not sure where the Wolfram software is installed on your system, check the value of $InstallationDirectory symbol.
4. Build and install the .paclet file. Evaluate the following command in the build directory:
cmake --build . --target install pacletImageMetadataTools paclet is now installed and ready to use.
The paclet is released under the terms of GPLv3 license. See LICENSE in the repository root.
- Rafał Chojna (rafalc) - main developer
