summaryrefslogtreecommitdiff
path: root/includes/DjVuImage.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/DjVuImage.php')
-rw-r--r--includes/DjVuImage.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/includes/DjVuImage.php b/includes/DjVuImage.php
index b857fa66..871c563b 100644
--- a/includes/DjVuImage.php
+++ b/includes/DjVuImage.php
@@ -208,7 +208,23 @@ class DjVuImage {
'resolution' => $resolution,
'gamma' => $gamma / 10.0 );
}
+
+ /**
+ * Return an XML string describing the DjVu image
+ * @return string
+ */
+ function retrieveMetaData() {
+ global $wgDjvuToXML;
+ if ( isset( $wgDjvuToXML ) ) {
+ $cmd = $wgDjvuToXML . ' --without-anno --without-text ' . $this->mFilename;
+ $xml = wfShellExec( $cmd, $retval );
+ } else {
+ $xml = null;
+ }
+ return $xml;
+ }
+
}
-?> \ No newline at end of file
+?>