MediaWiki  REL1_20
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 36 of file DjVuImage.php.


Constructor & Destructor Documentation

DjVuImage::__construct ( filename)

Definition at line 37 of file DjVuImage.php.


Member Function Documentation

Hack to temporarily work around djvutoxml bug.

Returns:
bool|string

Definition at line 290 of file DjVuImage.php.

References parseFormDjvu(), and wfDebug().

Referenced by retrieveMetaData().

For debugging; dump the IFF chunk structure.

Definition at line 73 of file DjVuImage.php.

References $file, dumpForm(), and echo.

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

Definition at line 83 of file DjVuImage.php.

References $file, and echo.

Referenced by dump().

Return data in the style of getimagesize()

Returns:
array or false on failure

Definition at line 55 of file DjVuImage.php.

References getInfo().

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

Definition at line 162 of file DjVuImage.php.

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

Referenced by getInfo().

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

Definition at line 189 of file DjVuImage.php.

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

Referenced by getInfo(), and getMultiPageInfo().

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

Returns:
bool

Definition at line 45 of file DjVuImage.php.

References getInfo().

Definition at line 281 of file DjVuImage.php.

References $matches, and UtfNormal\cleanUp().

DjVuImage::parseFormDjvu ( line,
&$  xml 
)

Definition at line 349 of file DjVuImage.php.

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

Referenced by convertDumpToXML().

DjVuImage::readChunk ( file) [private]

Definition at line 142 of file DjVuImage.php.

References $file.

Referenced by getMultiPageInfo(), and getPageInfo().

Return an XML string describing the DjVu image.

Returns:
string

Definition at line 228 of file DjVuImage.php.

References convertDumpToXML(), wfDebug(), wfEscapeShellArg(), wfProfileIn(), wfProfileOut(), and wfShellExec().

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

Definition at line 153 of file DjVuImage.php.

References $file.

Referenced by getMultiPageInfo().


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