kviewshell
DjVuInfo Class Reference
Information component. More...
#include <DjVuInfo.h>
Public Types | |
enum | { COMPRESSABLE_FLAG = 0x80, RESERVED_FLAGS1 = 0x7f } |
Public Member Functions | |
void | decode (ByteStream &bs) |
void | encode (ByteStream &bs) |
unsigned int | get_memory_usage () const |
GUTF8String | get_paramtags (void) const |
void | writeParam (ByteStream &out_str) const |
Static Public Member Functions | |
static GP< DjVuInfo > | create (void) |
Public Attributes | |
bool | compressable |
int | dpi |
double | gamma |
int | height |
GRect::Orientations | orientation |
int | version |
int | width |
Protected Member Functions | |
DjVuInfo (void) |
Detailed Description
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.
Definition at line 127 of file DjVuInfo.h.
Member Enumeration Documentation
anonymous enum |
Constructor & Destructor Documentation
DjVuInfo::DjVuInfo | ( | void | ) | [protected] |
Definition at line 85 of file DjVuInfo.cpp.
Member Function Documentation
Creates an empty DjVuInfo object.
The width# and height# fields are set to zero. All other fields are initialized with suitable default values.
Definition at line 135 of file DjVuInfo.h.
void DjVuInfo::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 {IFFByteStream::get_chunk}.
Definition at line 97 of file DjVuInfo.cpp.
void DjVuInfo::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 {IFFByteStream::put_chunk}.
Definition at line 146 of file DjVuInfo.cpp.
unsigned int DjVuInfo::get_memory_usage | ( | void | ) | const |
GUTF8String DjVuInfo::get_paramtags | ( | void | ) | const |
void DjVuInfo::writeParam | ( | ByteStream & | out_str | ) | const |
Member Data Documentation
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.
Definition at line 170 of file DjVuInfo.h.
int DjVuInfo::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.
Definition at line 162 of file DjVuInfo.h.
double DjVuInfo::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.
Definition at line 166 of file DjVuInfo.h.
int DjVuInfo::height |
We also store the current image orientation as three bits.
Definition at line 174 of file DjVuInfo.h.
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 "\Ref{DjVu version constants}".
Definition at line 157 of file DjVuInfo.h.
int DjVuInfo::width |
The documentation for this class was generated from the following files: