test/printxmp.cpp (472B) - raw
1 /* 2 * xmpedit 3 * Copyright 2010 Dan Callaghan <djc@djc.id.au> 4 * Released under GPLv2 5 */ 6 7 #include <iostream> 8 #include <exiv2/image.hpp> 9 10 /** Simplest possible utility to extract raw XMP packet from a file. */ 11 int main(int argc, char *argv[]) { 12 if (argc != 2) 13 return 1; 14 const std::string path(argv[1]); 15 std::auto_ptr<Exiv2::Image> image(Exiv2::ImageFactory::open(path)); 16 image->readMetadata(); 17 std::cout << image->xmpPacket(); 18 return 0; 19 }