skip to content | skip to sidebar

xmp2exif

When exporting images using Photoshop’s ‘Save for Web’, it is possible to store metadata in the image file, but only in the XMP format. Although XMP clearly is the way forward, some tools or web applications do not support this, and rely on the older EXIF format. Your precious metadata stored in your image is thus rendered useless for these older applications.

That’s where this utility comes in: all the wanted EXIF information is stored in the image, but just not in the write format. This tool will extract it from the XMP metadata and inject it again in the EXIF format.

using it

Using the utility is very simple: just call it with the image paths as arguments:

xmp2exif myimage1.jpg myimage2.jpg

You can also use wildcards:

xmp2exif *.jpg

subversion repository

source download

building it

That will probably prove a little more tricky. Although it’s only one source file, you’ll need the excellent exiv2 library to build it. And to build exiv2, you again will need expat and zlib.

xmp2exif comes with a CMakeLists.txt, so if you have CMake, you can use it to generate a makefile or visual studio solution, or any other favourite build project.

If you don’t use CMake, you can do things manually, which should be too hard (just one file ;-):

  • Compile xmp2exif.cpp adding exiv2 to the include dirs
  • Link with the exiv2 library.
  • On Windows, you should also link with setargv.obj to get the wildcard expansion.

licensing

xmp2exif is released under the GNU General Public License v2.0.