class DjVuInfo: public GPEnabled

Information component.

Inheritance:


Public Fields

[more]int width
Width of the DjVu image (in pixels).
[more]int height
Height of the DjVu image (in pixels).
[more]int version
DjVu file version number.
[more]int dpi
Resolution of the DjVu image.
[more]double gamma
Gamma coefficient of the display for which the image was designed.
[more]bool compressable
The following boolian values are stored in the last character of the info structure.

Public Methods

[more] DjVuInfo()
Constructs an empty DjVuInfo object.
[more]void decode(ByteStream &bs)
Decodes the DjVu "INFO" chunk.
[more]void encode(ByteStream &bs)
Encodes the DjVu "INFO" chunk.
[more]unsigned int get_memory_usage() const
Returns the number of bytes used by this object.


Inherited from GPEnabled:

Public Methods

oGPEnabled& operator=(const GPEnabled & obj)
oint get_count(void) const

Protected Fields

ovolatile int count


Documentation

Information component. Each instance of class DjVuInfo represents the information contained in the information chunk of a DjVu file. This "INFO" chunk is always the first chunk of a DjVu file.
o DjVuInfo()
Constructs an empty DjVuInfo object. The width and height fields are set to zero. All other fields are initialized with suitable default values.

ovoid decode(ByteStream &bs)
Decodes the DjVu "INFO" chunk. This function reads binary data from ByteStream bs and populates the fields of this DjVuInfo object. It is normally called after detecting an "INFO" chunk header with function get_chunk.

ovoid encode(ByteStream &bs)
Encodes the DjVu "INFO" chunk. This function writes the fields of this DjVuInfo object into ByteStream bs. It is normally called after creating an "INFO" chunk header with function put_chunk.

ounsigned int get_memory_usage() const
Returns the number of bytes used by this object.

oint width
Width of the DjVu image (in pixels).

oint height
Height of the DjVu image (in pixels).

oint version
DjVu file version number. This number characterizes the file format version used by the encoder to generate this DjVu image. A decoder should compare this version number with the constants described in section "DjVu version constants".

oint dpi
Resolution of the DjVu image. The resolution is given in ``pixels per 2.54 centimeters'' (this unit is sometimes called ``pixels per inch''). Display programs can use this information to determine the natural magnification to use for rendering a DjVu image.

odouble gamma
Gamma coefficient of the display for which the image was designed. The rendering functions can use this information in order to perform color correction for the intended display device.

obool compressable
The following boolian values are stored in the last character of the info structure. Unused bits are reserved for possible future extensions and backwards compatability.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.