MediaWiki  REL1_19
DjVuImage Class Reference

Support for detecting/validating DjVu image files and getting some basic file metadata (resolution etc) More...

List of all members.

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.

Private Member Functions

 dumpForm ($file, $length, $indent)
 getMultiPageInfo ($file, $formLength)
 getPageInfo ($file, $formLength)
 readChunk ($file)
 skipChunk ($file, $chunkLength)

Detailed Description

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 35 of file DjVuImage.php.


Constructor & Destructor Documentation

DjVuImage::__construct ( filename)

Definition at line 36 of file DjVuImage.php.


Member Function Documentation

Hack to temporarily work around djvutoxml bug.

Definition at line 288 of file DjVuImage.php.

References parseFormDjvu(), and wfDebug().

Referenced by retrieveMetaData().

Here is the call graph for this function:

Here is the caller graph for this function:

For debugging; dump the IFF chunk structure.

Definition at line 72 of file DjVuImage.php.

References $file, dumpForm(), and echo.

Here is the call graph for this function:

DjVuImage::dumpForm ( file,
length,
indent 
) [private]

Definition at line 82 of file DjVuImage.php.

References $file, and echo.

Referenced by dump().

Here is the caller graph for this function:

Return data in the style of getimagesize()

Returns:
array or false on failure

Definition at line 54 of file DjVuImage.php.

References getInfo().

Here is the call graph for this function:

Definition at line 107 of file DjVuImage.php.

References $file, getMultiPageInfo(), getPageInfo(), wfDebug(), wfRestoreWarnings(), and wfSuppressWarnings().

Referenced by getImageSize(), and isValid().

Here is the call graph for this function:

Here is the caller graph for this function:

DjVuImage::getMultiPageInfo ( file,
formLength 
) [private]

Definition at line 161 of file DjVuImage.php.

References $file, getPageInfo(), readChunk(), skipChunk(), and wfDebug().

Referenced by getInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

DjVuImage::getPageInfo ( file,
formLength 
) [private]

Definition at line 188 of file DjVuImage.php.

References $file, readChunk(), and wfDebug().

Referenced by getInfo(), and getMultiPageInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

Check if the given file is indeed a valid DjVu image file.

Returns:
bool

Definition at line 44 of file DjVuImage.php.

References getInfo().

Here is the call graph for this function:

Definition at line 280 of file DjVuImage.php.

References $matches, and UtfNormal\cleanUp().

Here is the call graph for this function:

DjVuImage::parseFormDjvu ( line,
&$  xml 
)

Definition at line 347 of file DjVuImage.php.

References Xml\element(), and Xml\tags().

Referenced by convertDumpToXML().

Here is the call graph for this function:

Here is the caller graph for this function:

DjVuImage::readChunk ( file) [private]

Definition at line 141 of file DjVuImage.php.

References $file.

Referenced by getMultiPageInfo(), and getPageInfo().

Here is the caller graph for this function:

Return an XML string describing the DjVu image.

Returns:
string

Definition at line 227 of file DjVuImage.php.

References $wgDjvuDump, $wgDjvuToXML, $wgDjvuTxt, convertDumpToXML(), wfDebug(), wfEscapeShellArg(), wfProfileIn(), wfProfileOut(), and wfShellExec().

Here is the call graph for this function:

DjVuImage::skipChunk ( file,
chunkLength 
) [private]

Definition at line 152 of file DjVuImage.php.

References $file.

Referenced by getMultiPageInfo().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: