Public Member Functions | Public Attributes

Celartem::DjVu::DjVuEncoder::Params Struct Reference

#include <djv_djvuencoder.h>

List of all members.

Public Member Functions

 Params (EncodeMode inEncoderMode=em3Layer, size_t inFgSubsample=12, size_t inFgQuality=75, size_t inBgSubsample=3, size_t inBgQuality=75, size_t inUpsample=1, size_t inSubsample=1)
void loadFromProfile (const String &inProfileName)
void loadFromXmlFile (const String &inXmlFileName)

Public Attributes

DictionaryType dictionaryType
size_t autoDictFlushFreq
String profileName
EncodeMode encodeMode
 The foreground type.
EmptyMaskProcess emptyMaskProcess
 Process for the empty mask cases.
BitonalEncodingMethod bitonalEncoding
 Encoding for mask/bitonal layer.
PictureEncodingMethod pictureEncoding
 Encoding for picture layer.
bool flexEncodeMode
bool blackCompensation
size_t subsample
size_t upsample
size_t fgSubsample
 The subsample ratio of the FG44 foreground.
IW44Encoder::Params fgParams
 The FG44/PM44 foreground configuration.
size_t bgSubsample
 The subsample ratio of the BG44 background.
IW44Encoder::Params bgParams
 The BG44 background configuration.
Segmenter::Params segParams
 Segmenter configuration.
JB2Encoder::Params jb2Params
 JB2 configuration.
String fgJpxParams
String jpxParams
size_t gamma
 Gamma of the DjVu image.
u32 flags

Detailed Description

This struct contains parameters to configure the DjVu encoder settings.


Constructor & Destructor Documentation

Celartem::DjVu::DjVuEncoder::Params::Params ( EncodeMode  inEncoderMode = em3Layer,
size_t  inFgSubsample = 12,
size_t  inFgQuality = 75,
size_t  inBgSubsample = 3,
size_t  inBgQuality = 75,
size_t  inUpsample = 1,
size_t  inSubsample = 1 
) [inline]

Initialize a new Params structure.


Member Function Documentation

void Celartem::DjVu::DjVuEncoder::Params::loadFromProfile ( const String inProfileName  ) 

Load configuration from the specified profile.

Parameters:
inProfileName Name of a profile to load.
void Celartem::DjVu::DjVuEncoder::Params::loadFromXmlFile ( const String inXmlFileName  ) 

Load configuration from the specified XML file.

Parameters:
inXmlFileName File name of a XML file.

Member Data Documentation

Determines how many pages share a dictionary; in other words, this is the frequency of the flushing the dictionary.
DjVuEncoder instance automatically flushes the dictionary if the number of pages specified by inAutoDictFlushFreq is encoded.
If 0 is specified, the automatic flush feature is disabled and you should call finalizeSession manually.
Even with inAutoDictFlushFreq value not equal to 0, you can manually call finalizeSession and then the dictionary is flushed immediately regardless of inAutoDictFlushFreq value.
The default is 20.

The BG44 background configuration.

It is only supported by emFG44, emPicture and emColorJB2.
For more information, see IW44Encoder class.

The subsample ratio of the BG44 background.

This value must be in the range of 1-12. The default is 3.
It is only supported by emFG44, emPicture and emColorJB2.
Please note that the final output size also depends on the upsample value.

Encoding for mask/bitonal layer.

One of BitonalEncodingMethod enumeration values to choose encoding method for mask/bitonal layer.

Whether to enhance black in preprocessing phase.
The default is false.

Determines whether it uses shared dictionary or not. This should be one of DictionaryType enumeration values. If this value is dtNoSharedDict, inAutoDictFlushFreq is ignored.
The default is dtUseSharedDict.

Process for the empty mask cases.

It should be one of EmptyMaskProcess enumeration. The default is mepPictureOrBitonal.

The foreground type.

It should be one of EncodeMode enumeration. The default is em3Layer. The following table illustrates what EncodeMode supports what parameters:

encodeMode fgSubsample fgParams bgSubsample bgParams
emFG44 xxxx
emColorJB2 xx
emPicture x
emBitonal

JPX encoder parameters for foreground.
For high-compression PDF.
You can use this parameter with JXPEncoder::Params constructor.

The FG44/PM44 foreground configuration.

It is only supported by emFG44.
For more information, see IW44Encoder class.

The subsample ratio of the FG44 foreground.

This value must be in the range of 1-12. The default is 12.
It is only supported by emFG44.
Please note that the final output size also depends on the upsample value.

Any combination of EncodeFlags enumeration values.

If this value is true, the encoder firstly examines the input image and change the encode mode according to the image type if possible. The default is true.
For more historical and algorithmic background, see emAuto.

Gamma of the DjVu image.

The value should be 10 times of the actual gamma. If you set gamma 2.2, this value is 22.
Please note that this is an attribute of DjVu encoded image and not "gamma correction".

JB2 configuration.

JB2 related parameters which is used on JB2 encoding.

JPX encoder parameters for other than foreground.
For high-compression PDF. You can use this parameter with JXPEncoder::Params constructor.

Encoding for picture layer.

One of BitonalEncodingMethod enumeration values to choose encoding method for picture layer.

Profile name if the parameters are loaded from a profile otherwise NullString.

Segmenter configuration.

Segmenter related parameters which is used on segmentation.

If this value is not equal to 1.0, DjVuEncoder::addPage method firstly subsamples the input image with the specified resample coeffecient; 2 to downsample the image twice.
Note that if any mask is explicitly specified on the call of DjVuEncoder::addPage, this parameter is simply ignored. The default is 1.

See also:
upsample

If this value is not equal to 1, DjVuEncoder::addPage method firstly upsamples the input image with the specified upsample coeffecient; 2 to upsample the image twice.
Note that if any mask is explicitly specified on the call of DjVuEncoder::addPage, this parameter is simply ignored. The default is 1.

See also:
subsample

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

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:20.
Caminova Logo