Public Types | Public Member Functions | Public Attributes | List of all members
Celartem::DjVu::DjVuEncoder::Params Struct Reference

#include <djv_djvuencoder.h>

Public Types

typedef std::map< String, StringExtras
 

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. More...
 
EmptyMaskProcess emptyMaskProcess
 Process for the empty mask cases. More...
 
BitonalEncodingMethod bitonalEncoding
 Encoding for mask/bitonal layer. More...
 
PictureEncodingMethod pictureEncoding
 Encoding for picture layer. More...
 
bool flexEncodeMode
 
bool blackCompensation
 
size_t subsample
 
size_t upsample
 
size_t postSegmentSubsample
 
size_t fgSubsample
 The subsample ratio of the FG44 foreground. More...
 
size_t fgEnhancer
 The foreground color enhancement. More...
 
IW44Encoder::Params fgParams
 The FG44/PM44 foreground configuration. More...
 
size_t bgSubsample
 The subsample ratio of the BG44 background. More...
 
size_t bgEnhancer
 The background color enhancement. More...
 
IW44Encoder::Params bgParams
 The BG44 background configuration. More...
 
Segmenter::Params segParams
 Segmenter configuration. More...
 
JB2Encoder::Params jb2Params
 JB2 configuration. More...
 
String fgJpxParams
 
String jpxParams
 
size_t gamma
 Gamma of the DjVu image. More...
 
u32 flags
 
Extras extras
 

Detailed Description

This struct contains parameters to configure the DjVu encoder settings.

Member Typedef Documentation

Type definition for extras.

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
inProfileNameName of a profile to load.
void Celartem::DjVu::DjVuEncoder::Params::loadFromXmlFile ( const String inXmlFileName)

Load configuration from the specified XML file.

Parameters
inXmlFileNameFile name of a XML file.

Member Data Documentation

size_t Celartem::DjVu::DjVuEncoder::Params::autoDictFlushFreq

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.

size_t Celartem::DjVu::DjVuEncoder::Params::bgEnhancer

The background color enhancement.

This value must be in the range of 0-16. The default is 0.

IW44Encoder::Params Celartem::DjVu::DjVuEncoder::Params::bgParams

The BG44 background configuration.

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

size_t Celartem::DjVu::DjVuEncoder::Params::bgSubsample

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.

BitonalEncodingMethod Celartem::DjVu::DjVuEncoder::Params::bitonalEncoding

Encoding for mask/bitonal layer.

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

bool Celartem::DjVu::DjVuEncoder::Params::blackCompensation

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

DictionaryType Celartem::DjVu::DjVuEncoder::Params::dictionaryType

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.

EmptyMaskProcess Celartem::DjVu::DjVuEncoder::Params::emptyMaskProcess

Process for the empty mask cases.

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

EncodeMode Celartem::DjVu::DjVuEncoder::Params::encodeMode

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
Extras Celartem::DjVu::DjVuEncoder::Params::extras

Extra parameters, which is used by third party modules.

size_t Celartem::DjVu::DjVuEncoder::Params::fgEnhancer

The foreground color enhancement.

This value must be in the range of 0-16. The default is 0.

String Celartem::DjVu::DjVuEncoder::Params::fgJpxParams

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

IW44Encoder::Params Celartem::DjVu::DjVuEncoder::Params::fgParams

The FG44/PM44 foreground configuration.

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

size_t Celartem::DjVu::DjVuEncoder::Params::fgSubsample

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.

u32 Celartem::DjVu::DjVuEncoder::Params::flags

Any combination of EncodeFlags enumeration values.

bool Celartem::DjVu::DjVuEncoder::Params::flexEncodeMode

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.

size_t Celartem::DjVu::DjVuEncoder::Params::gamma

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".

JB2Encoder::Params Celartem::DjVu::DjVuEncoder::Params::jb2Params

JB2 configuration.

JB2 related parameters which is used on JB2 encoding.

String Celartem::DjVu::DjVuEncoder::Params::jpxParams

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

PictureEncodingMethod Celartem::DjVu::DjVuEncoder::Params::pictureEncoding

Encoding for picture layer.

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

size_t Celartem::DjVu::DjVuEncoder::Params::postSegmentSubsample

If this value is not equal to 1, the image and the mask are subsampled after the segmentation process.

See Also
subsample, upsample
String Celartem::DjVu::DjVuEncoder::Params::profileName

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

Segmenter::Params Celartem::DjVu::DjVuEncoder::Params::segParams

Segmenter configuration.

Segmenter related parameters which is used on segmentation.

size_t Celartem::DjVu::DjVuEncoder::Params::subsample

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
size_t Celartem::DjVu::DjVuEncoder::Params::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:

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:07.
Cuminas Logo