MediaWiki REL1_33
|
Support for detecting/validating DjVu image files and getting some basic file metadata (resolution etc) More...
Public Member Functions | |
__construct ( $filename) | |
convertDumpToXML ( $dump) | |
Hack to temporarily work around djvutoxml bug. | |
dump () | |
For debugging; dump the IFF chunk structure. | |
getImageSize () | |
Return data in the style of getimagesize() | |
getInfo () | |
isValid () | |
Check if the given file is indeed a valid DjVu image file. | |
pageTextCallback ( $matches) | |
parseFormDjvu ( $line, &$xml) | |
retrieveMetaData () | |
Return an XML string describing the DjVu image. | |
Public Attributes | |
const | DJVUTXT_MEMORY_LIMIT = 300000 |
@const DJVUTXT_MEMORY_LIMIT Memory limit for the DjVu description software | |
Private Member Functions | |
dumpForm ( $file, $length, $indent) | |
getMultiPageInfo ( $file, $formLength) | |
getPageInfo ( $file) | |
readChunk ( $file) | |
skipChunk ( $file, $chunkLength) | |
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 47 of file DjVuImage.php.
DjVuImage::convertDumpToXML | ( | $dump | ) |
Hack to temporarily work around djvutoxml bug.
string | $dump |
Definition at line 311 of file DjVuImage.php.
References $line, and(), parseFormDjvu(), version, and wfDebug().
Referenced by retrieveMetaData().
DjVuImage::dump | ( | ) |
For debugging; dump the IFF chunk structure.
Definition at line 84 of file DjVuImage.php.
References $header, and(), and dumpForm().
|
private |
Definition at line 95 of file DjVuImage.php.
References and(), and dumpForm().
Referenced by dump(), and dumpForm().
DjVuImage::getImageSize | ( | ) |
Return data in the style of getimagesize()
Definition at line 65 of file DjVuImage.php.
DjVuImage::getInfo | ( | ) |
Definition at line 121 of file DjVuImage.php.
References $header, and(), getMultiPageInfo(), getPageInfo(), and wfDebug().
Referenced by getImageSize(), and isValid().
|
private |
Definition at line 177 of file DjVuImage.php.
References and(), getPageInfo(), list, readChunk(), skipChunk(), and wfDebug().
Referenced by getInfo().
|
private |
Definition at line 206 of file DjVuImage.php.
References $data, and(), list, 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 55 of file DjVuImage.php.
References getInfo().
Referenced by retrieveMetaData().
DjVuImage::pageTextCallback | ( | $matches | ) |
Definition at line 299 of file DjVuImage.php.
DjVuImage::parseFormDjvu | ( | $line, | |
& | $xml ) |
Definition at line 372 of file DjVuImage.php.
Referenced by convertDumpToXML().
|
private |
Definition at line 157 of file DjVuImage.php.
References $header, and and().
Referenced by getMultiPageInfo(), and getPageInfo().
DjVuImage::retrieveMetaData | ( | ) |
Return an XML string describing the DjVu image.
Definition at line 248 of file DjVuImage.php.
References $wgDjvuDump, $wgDjvuToXML, $wgDjvuTxt, and(), convertDumpToXML(), isValid(), wfDebug(), and wfShellExec().
|
private |
const DjVuImage::DJVUTXT_MEMORY_LIMIT = 300000 |
@const DJVUTXT_MEMORY_LIMIT Memory limit for the DjVu description software
Definition at line 42 of file DjVuImage.php.