MediaWiki
REL1_22
|
Support for detecting/validating DjVu image files and getting some basic file metadata (resolution etc) More...
Public Member Functions | |
__construct ($filename) | |
Constructor. | |
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 |
DJVUTXT_MEMORY_LIMIT Memory limit for the DjVu description software | |
Private Member Functions | |
dumpForm ($file, $length, $indent) | |
getMultiPageInfo ($file, $formLength) | |
getPageInfo ($file, $formLength) | |
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 36 of file DjVuImage.php.
DjVuImage::__construct | ( | $ | filename | ) |
Constructor.
string | $filename | The DjVu file name. |
Definition at line 42 of file DjVuImage.php.
DjVuImage::convertDumpToXML | ( | $ | dump | ) |
Hack to temporarily work around djvutoxml bug.
Definition at line 299 of file DjVuImage.php.
References parseFormDjvu(), version, and wfDebug().
Referenced by retrieveMetaData().
DjVuImage::dump | ( | ) |
For debugging; dump the IFF chunk structure.
Definition at line 82 of file DjVuImage.php.
References $file, and dumpForm().
DjVuImage::dumpForm | ( | $ | file, |
$ | length, | ||
$ | indent | ||
) | [private] |
Return data in the style of getimagesize()
Definition at line 64 of file DjVuImage.php.
Definition at line 117 of file DjVuImage.php.
References $file, getMultiPageInfo(), getPageInfo(), wfDebug(), wfRestoreWarnings(), and wfSuppressWarnings().
Referenced by getImageSize(), and isValid().
DjVuImage::getMultiPageInfo | ( | $ | file, |
$ | formLength | ||
) | [private] |
Definition at line 171 of file DjVuImage.php.
References $file, getPageInfo(), list, readChunk(), skipChunk(), and wfDebug().
Referenced by getInfo().
DjVuImage::getPageInfo | ( | $ | file, |
$ | formLength | ||
) | [private] |
Definition at line 198 of file DjVuImage.php.
References $file, array(), list, readChunk(), and wfDebug().
Referenced by getInfo(), and getMultiPageInfo().
Check if the given file is indeed a valid DjVu image file.
Definition at line 55 of file DjVuImage.php.
References getInfo().
DjVuImage::pageTextCallback | ( | $ | matches | ) |
Definition at line 290 of file DjVuImage.php.
References $matches, and UtfNormal\cleanUp().
DjVuImage::parseFormDjvu | ( | $ | line, |
&$ | xml | ||
) |
Definition at line 358 of file DjVuImage.php.
References array(), Xml\element(), and tags().
Referenced by convertDumpToXML().
DjVuImage::readChunk | ( | $ | file | ) | [private] |
Definition at line 151 of file DjVuImage.php.
References $file, and array().
Referenced by getMultiPageInfo(), and getPageInfo().
Return an XML string describing the DjVu image.
Definition at line 237 of file DjVuImage.php.
References $retval, array(), convertDumpToXML(), empty, global, in, page, wfDebug(), wfEscapeShellArg(), wfProfileIn(), wfProfileOut(), and wfShellExec().
DjVuImage::skipChunk | ( | $ | file, |
$ | chunkLength | ||
) | [private] |
const DjVuImage::DJVUTXT_MEMORY_LIMIT = 300000 |
DJVUTXT_MEMORY_LIMIT Memory limit for the DjVu description software
Definition at line 49 of file DjVuImage.php.