Public Member Functions | |
__construct ($filename) | |
isValid () | |
Check if the given file is indeed a valid DjVu image file. | |
getImageSize () | |
Return data in the style of getimagesize(). | |
dump () | |
For debugging; dump the IFF chunk structure. | |
getInfo () | |
retrieveMetaData () | |
Return an XML string describing the DjVu image. | |
convertDumpToXML ($dump) | |
Hack to temporarily work around djvutoxml bug. | |
parseFormDjvu ($line, &$xml) | |
Private Member Functions | |
dumpForm ($file, $length, $indent) | |
readChunk ($file) | |
skipChunk ($file, $chunkLength) | |
getMultiPageInfo ($file, $formLength) | |
getPageInfo ($file, $formLength) |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html 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 34 of file DjVuImage.php.
DjVuImage::__construct | ( | $ | filename | ) |
DjVuImage::convertDumpToXML | ( | $ | dump | ) |
Hack to temporarily work around djvutoxml bug.
Definition at line 251 of file DjVuImage.php.
References parseFormDjvu(), wfDebug(), and xml.
Referenced by retrieveMetaData().
DjVuImage::dump | ( | ) |
For debugging; dump the IFF chunk structure.
Definition at line 71 of file DjVuImage.php.
References $file, and dumpForm().
DjVuImage::dumpForm | ( | $ | file, | |
$ | length, | |||
$ | indent | |||
) | [private] |
DjVuImage::getImageSize | ( | ) |
Return data in the style of getimagesize().
Definition at line 53 of file DjVuImage.php.
References getInfo().
DjVuImage::getInfo | ( | ) |
Definition at line 106 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 160 of file DjVuImage.php.
References $file, $start, getPageInfo(), readChunk(), skipChunk(), and wfDebug().
Referenced by getInfo().
DjVuImage::getPageInfo | ( | $ | file, | |
$ | formLength | |||
) | [private] |
Definition at line 187 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 43 of file DjVuImage.php.
References getInfo().
DjVuImage::parseFormDjvu | ( | $ | line, | |
&$ | xml | |||
) |
Definition at line 310 of file DjVuImage.php.
References Xml::element(), and Xml::tags().
Referenced by convertDumpToXML().
DjVuImage::readChunk | ( | $ | file | ) | [private] |
Definition at line 140 of file DjVuImage.php.
References $file.
Referenced by getMultiPageInfo(), and getPageInfo().
DjVuImage::retrieveMetaData | ( | ) |
Return an XML string describing the DjVu image.
Definition at line 226 of file DjVuImage.php.
References $cmd, $wgDjvuDump, $wgDjvuToXML, convertDumpToXML(), wfEscapeShellArg(), wfProfileIn(), wfProfileOut(), and wfShellExec().
DjVuImage::skipChunk | ( | $ | file, | |
$ | chunkLength | |||
) | [private] |