MediaWiki fundraising/REL1_35
|
Support for detecting/validating DjVu image files and getting some basic file metadata (resolution etc) More...
Public Member Functions | |
__construct ( $filename) | |
dump () | |
For debugging; dump the IFF chunk structure. | |
getImageSize () | |
Return data in the style of getimagesize() | |
isValid () | |
Check if the given file is indeed a valid DjVu image file. | |
retrieveMetaData () | |
Return an XML string describing the DjVu image. | |
Private Member Functions | |
convertDumpToXML ( $dump) | |
Hack to temporarily work around djvutoxml bug. | |
dumpForm ( $file, $length, $indent) | |
getInfo () | |
getMultiPageInfo ( $file, $formLength) | |
getPageInfo ( $file) | |
pageTextCallback ( $matches) | |
parseFormDjvu ( $line, &$xml) | |
readChunk ( $file) | |
skipChunk ( $file, $chunkLength) | |
Private Attributes | |
string | $mFilename |
const | DJVUTXT_MEMORY_LIMIT = 300000 |
Memory limit for the DjVu description software. | |
Support for detecting/validating DjVu image files and getting some basic file metadata (resolution etc)
File format docs are available in source package for DjVuLibre: http://djvulibre.djvuzone.org/
Definition at line 38 of file DjVuImage.php.
DjVuImage::__construct | ( | $filename | ) |
string | $filename | The DjVu file name. |
Definition at line 51 of file DjVuImage.php.
|
private |
Hack to temporarily work around djvutoxml bug.
string | $dump |
Definition at line 315 of file DjVuImage.php.
References $line, parseFormDjvu(), and wfDebug().
Referenced by retrieveMetaData().
DjVuImage::dump | ( | ) |
For debugging; dump the IFF chunk structure.
Definition at line 88 of file DjVuImage.php.
References $file, $header, and dumpForm().
|
private |
Definition at line 99 of file DjVuImage.php.
References $file, and dumpForm().
Referenced by dump(), and dumpForm().
DjVuImage::getImageSize | ( | ) |
Return data in the style of getimagesize()
Definition at line 69 of file DjVuImage.php.
References getInfo().
|
private |
Definition at line 125 of file DjVuImage.php.
References $file, $header, getMultiPageInfo(), getPageInfo(), and wfDebug().
Referenced by getImageSize(), and isValid().
|
private |
Definition at line 181 of file DjVuImage.php.
References $file, getPageInfo(), readChunk(), skipChunk(), and wfDebug().
Referenced by getInfo().
|
private |
Definition at line 210 of file DjVuImage.php.
References $file, readChunk(), and wfDebug().
Referenced by getInfo(), and getMultiPageInfo().
DjVuImage::isValid | ( | ) |
Check if the given file is indeed a valid DjVu image file.
Definition at line 59 of file DjVuImage.php.
References getInfo().
Referenced by retrieveMetaData().
|
private |
Definition at line 303 of file DjVuImage.php.
References $matches.
|
private |
|
private |
Definition at line 161 of file DjVuImage.php.
References $file, and $header.
Referenced by getMultiPageInfo(), and getPageInfo().
DjVuImage::retrieveMetaData | ( | ) |
Return an XML string describing the DjVu image.
Definition at line 252 of file DjVuImage.php.
References $wgDjvuDump, $wgDjvuToXML, $wgDjvuTxt, convertDumpToXML(), isValid(), wfDebug(), and wfShellExec().
|
private |
|
private |
Definition at line 46 of file DjVuImage.php.
|
private |
Memory limit for the DjVu description software.
Definition at line 43 of file DjVuImage.php.