#!/bin/perl -w # xmlpextract.pl $Id$ by Dan Brickley # with help from Nadia Heninger # Perl script that XMP metadata chunks from media files (JPEG, PDF, ...) # # XMP spec: http://www.adobe.com/products/xmp/main.html # rdfpic: http://jigsaw.w3.org/rdfpic/ # rdfweb: http://rdfweb.org/2002/01/photo/ # see also: http://www.profium.com/gb/products/extractor my $c; open(IN, shift) || die "No image file to scan for XMP packets"; while(){ $c .= $_; } close IN; $c =~ m/id='W5M0MpCehiHzreSzNTczkc9d'\?>(.*)<\?xpacket end='([^']*)'\?>/sg; print $1;