From a70367ee97eda8749960ab2606bd6c811aec99fa Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 7 Oct 2010 18:39:03 -0300 Subject: Updating XMP handling due to API changes --- exif.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'exif.class.php') diff --git a/exif.class.php b/exif.class.php index b5ad35b..29a0b02 100644 --- a/exif.class.php +++ b/exif.class.php @@ -190,6 +190,7 @@ Class Exif { */ function openXMP($file) { // Setup. + SXMPFiles::Initialize(); $xmpfiles = new SXMPFiles(); $xmpmeta = new SXMPMeta(); @@ -241,10 +242,10 @@ Class Exif { // Try to read XMP data if the namespace is available. if(@$xmpmeta->GetNamespacePrefix($config['ns'])) { if ($config['type'] == 'property') { - $value = @$xmpmeta->GetProperty($config['name'], $config['ns']); + $value = @$xmpmeta->GetProperty($config['ns'], $config['name']); } elseif ($config['type'] == 'array') { - $value = @$xmpmeta->GetArrayItem($config['name'], $key, $config['ns']); + $value = @$xmpmeta->GetArrayItem($key, $config['ns'], $config['name']); } elseif ($config['type'] == 'struct') { $value = @$xmpmeta->GetStructField($config['ns'], $config['struct'], $config['ns'], $config['name']); -- cgit v1.2.3