MediaWiki master
DjVuImage Class Reference

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

Public Member Functions

 __construct ( $filename)
 
 dump ()
 For debugging; dump the IFF chunk structure.
 
 getImageSize ()
 Return width and height.
 
 isValid ()
 Check if the given file is indeed a valid DjVu image file.
 
 retrieveMetaData ()
 Return an array describing the DjVu image.
 

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

Constructor & Destructor Documentation

◆ __construct()

DjVuImage::__construct ( $filename)
Parameters
string$filenameThe DjVu file name.

Definition at line 54 of file DjVuImage.php.

Member Function Documentation

◆ dump()

DjVuImage::dump ( )

For debugging; dump the IFF chunk structure.

Definition at line 89 of file DjVuImage.php.

References $header.

◆ getImageSize()

DjVuImage::getImageSize ( )

Return width and height.

Returns
array An array with "width" and "height" keys, or an empty array on failure.

Definition at line 72 of file DjVuImage.php.

◆ isValid()

DjVuImage::isValid ( )

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

Returns
bool

Definition at line 62 of file DjVuImage.php.

Referenced by retrieveMetaData().

◆ retrieveMetaData()

DjVuImage::retrieveMetaData ( )

Return an array describing the DjVu image.

Returns
array|null|false

Definition at line 252 of file DjVuImage.php.

References $matches, isValid(), wfDebug(), and wfShellExec().


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