#include <djv_utils.h>
Public Types | |
enum | { DJVUVER_SUPPORTROTATION = 22, DJVUVER_RECOMMENDED = 25, DJVUVER_LATEST = 27 } |
enum | Flags { Compressible = 0x80, BgIsPalettized = 0x40, BgIsNotWhite = 0x20, ReservedBits = 0x18, OrientationBits = 0x07 } |
Public Member Functions | |
PageInfo (size_t inWidth=0, size_t inHeight=0, size_t inDpi=300, size_t inGamma=22, size_t inFlags=1, size_t inVersion=25, size_t inReserved=0) | |
PageInfo (Stream *inStream) | |
PageInfo (const Chunk *inChunk) | |
void | decode (Stream *inStream) |
void | decode (const Chunk *inChunk) |
void | encode (Stream *inStream) |
AutoPtr< Chunk > | encodeINFOChunk () |
Rotation | getRotation () const |
void | setRotation (Rotation inRotation) |
Public Attributes | |
size_t | width |
The width of the page. More... | |
size_t | height |
The height of the page. More... | |
size_t | version |
The version of the page. More... | |
size_t | reserved |
Reserved. Should be 0. More... | |
size_t | dpi |
The dpi (dot-per-inch) of the page. More... | |
size_t | gamma |
The gamma of the page. More... | |
size_t | flags |
The flags. More... | |
This structure is used to get/set the information against INFO
chunk.
anonymous enum |
The bits used with flags variable.
|
inline |
Initialize the data members.
inWidth | The width of the page. See width. |
inHeight | The height of the page. See height. |
inDpi | The dpi (dot-per-inch) of the page. See dpi. |
inGamma | The gamma of the page. See gamma. |
inFlags | The additional flags. See flags. |
inVersion | The version of the page. See version. |
inReserved | Normally 0. See reserved. |
|
inline |
This constructor initializes the structure by loading INFO
chunk from the specified stream.
inStream | Stream to read. |
|
inline |
|
inline |
Decodes the INFO chunk from the specified stream.
inStream | Stream to read. |
Referenced by decode(), and PageInfo().
|
inline |
Decodes the specified INFO
chunk.
inChunk | Pointer to the Chunk instance which contains INFO chunk. |
|
inline |
Converts the current status of this instance to INFO
chunk and write out to the specified stream.
inStream | Stream to write on. |
Referenced by encodeINFOChunk().
Converts the current status of this instance to INFO
chunk.
|
inline |
Returns the rotation status according to the current flags variable.
|
inline |
Sets the rotation status to the current flags variable.
Please note that if the version is smaller than DJVUVER_SUPPORTROTATION (22), this method internally updates the file version.
inRotation | The rotation status to set. |
size_t Celartem::DjVu::PageInfo::dpi |
size_t Celartem::DjVu::PageInfo::flags |
The flags.
Traditionally, the flags has many meanings but currently, only rotation specification is used.
To access rotation status, you had better use setRotation and getRotation methods.
The rotation feature seems to have introduced with DjVu file format version 22. And the following values are supported by the current viewer:
0 or 1 | 0 degree |
6 or 7 | 90 degree |
2 or 3 | 180 degree |
4 or 5 | 270 degree |
Referenced by decode(), encode(), getRotation(), and setRotation().
size_t Celartem::DjVu::PageInfo::gamma |
size_t Celartem::DjVu::PageInfo::height |
size_t Celartem::DjVu::PageInfo::reserved |
size_t Celartem::DjVu::PageInfo::version |
The version of the page.
In the spec, this is described as "Minor Version".
DjVu Ver. | Viewer Ver. | Notes |
---|---|---|
22 | ? | Add support for page rotation feature. |
25 | 5.X | Wide-spreaded version. |
26 | 6.0 | Add support for Line/Text annotation. |
Referenced by decode(), encode(), getRotation(), and setRotation().
size_t Celartem::DjVu::PageInfo::width |