#include <djv_djvuencoder.h>
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 |
This struct contains parameters to configure the DjVu encoder settings.
| 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.
| void Celartem::DjVu::DjVuEncoder::Params::loadFromProfile | ( | const String & | inProfileName | ) |
Load configuration from the specified profile.
| inProfileName | Name of a profile to load. |
| void Celartem::DjVu::DjVuEncoder::Params::loadFromXmlFile | ( | const String & | inXmlFileName | ) |
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 | x | x | x | x |
| emColorJB2 | x | x | ||
| 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.
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.
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.
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.
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.