The FILEJBIG2OPTIONS structure provides information for saving JBIG2 files.
typedef struct _FILEJBIG2OPTIONS
{
L_UINT uStructSize;
L_UINT uImageFlags;
L_UCHAR ucImageTemplateType;
L_CHAR ImageGBATX1;
L_CHAR ImageGBATY1;
L_CHAR ImageGBATX2;
L_CHAR ImageGBATY2;
L_CHAR ImageGBATX3;
L_CHAR ImageGBATY3;
L_CHAR ImageGBATX4;
L_CHAR ImageGBATY4;
L_UINT uImageQFactor;
L_UINT uTextFlags;
L_UCHAR ucTextTemplateType;
L_CHAR TextGBATX1;
L_CHAR TextGBATY1;
L_CHAR TextGBATX2;
L_CHAR TextGBATY2;
L_CHAR TextGBATX3;
L_CHAR TextGBATY3;
L_CHAR TextGBATX4;
L_CHAR TextGBATY4;
L_UINT uTextMinSymArea;
L_UINT uTextMinSymWidth;
L_UINT uTextMinSymHeight;
L_UINT uTextMaxSymArea;
L_UINT uTextMaxSymWidth;
L_UINT uTextMaxSymHeight;
L_UINT uTextDifThreshold;
L_UINT uTextQFactor;
L_UINT uXResolution;
L_UINT uYResolution;
L_UINT uFlags;
}FILEJBIG2OPTIONS,* pFILEJBIG2OPTIONS;
Size of this structure in bytes, for versioning. Use the sizeof() operator to calculate this value.
Value that specifies which template-based arithmetic encoder to use when encoding a non-text area. Possible values are:
Value | Meaning | Template |
---|---|---|
0 | Three lines with a 16-pixel template. | |
1 | Three lines with a 13-pixel template. | |
2 | Three lines with a 10-pixel template. | |
3 | Two lines with a 10-pixel template. |
The X location of the adaptive template pixel A1 for a non-text area encoding. Possible values range from -128 to 127 except when the value of the member ImageGBATY1 is zero, in which case it ranges from 128 to 1.
The Y location of the adaptive template pixel A1 for a non-text area encoding. Possible values range from -128 to 0.
The X location of the adaptive template pixel A2 for a non-text area encoding. Possible values range from -128 to 127, except when the value of the member ImageGBATY2 is zero, in which case it ranges from 128 to 1.
The Y location of the adaptive template pixel A2 for a non-text area encoding. Possible values range from -128 to 0.
The X location of the adaptive template pixel A3 for a non-text area encoding. Possible values range from -128 to 127, except when the values of the member ImageGBATY3 is zero, in which case it ranges from 128 to -1.
The Y location of the adaptive template pixel A3 for a non-text area encoding. Possible values range from -128 to 0.
The X location of the adaptive template pixel A4 for a non-text area encoding. Possible values range from -128 to 127, except when the value of the member ImageGBATY4 is zero, in which case it ranges from 128 to -1.
The Y location of the adaptive template pixel A4 for a non-text area encoding. Possible values range from -128 to 0.
Value that represents the degree of loss in the compression process for a non-text area. The value of 0 means lossless while any other value means lossy.
0 is the default value.
Flag that indicates whether to use typical prediction (TP) when encoding a non-text area. Possible values are:
Value | Meaning |
---|---|
JBIG2_IMAGE_TPON | [0x0010] Use typical prediction (TP). |
Value that specifies which template-based arithmetic encoder to use when encoding a text area. Possible values are:
Value | Meaning | Template |
---|---|---|
0 | Three lines with a 16-pixel template. | |
1 | Three lines with a 13-pixel template. | |
2 | Three lines with a 10-pixel template. | |
3 | Two lines with a 10-pixel template. |
The X location of the adaptive template pixel A1 for a text area encoding. Possible values range from -128 to 127 except when the value of the member TextGBATY1 is zero, in which case it ranges from 128 to 1.
The Y location of the adaptive template pixel A1 for a text area encoding. Possible values range from -128 to 0.
The X location of the adaptive template pixel A2 for a text area encoding. Possible values range from -128 to 127, except when the value of the member TextGBATY2 is zero, in which case it ranges from 128 to 1.
The Y location of the adaptive template pixel A2 for a text area encoding. Possible values range from -128 to 0.
The X location of the adaptive template pixel A3 for a text area encoding. Possible values range from -128 to 127 except when the value of the member TextGBATY3 is zero, in which case it ranges from 128 to -1.
The Y location of the adaptive template pixel A3 for a text area encoding. Possible values range from -128 to 0.
The X location of the adaptive template pixel A4 for a text area encoding. Possible values range from -128 to 127 except when the value of the member TextGBATY4 is zero, in which case it ranges from 128 to -1.
The Y location of the adaptive template pixel A4 for a text area encoding. Possible values range from -128 to 0.
Value that represents the minimum text symbol area, in pixels.
Value that represents the minimum text symbol width, in pixels.
Value that represents the minimum text symbol height, in pixels.
Value that represents the maximum text symbol area, in pixels.
Value that represents the maximum text symbol width, in pixels.
Value that represents the maximum text symbol height, in pixels.
Value that represents the maximum difference allowed to map a text symbol to a dictionary symbol, in percent.
Value that represents the degree of the loss in the compression process for a text area. The value of 0 means lossless while any other value means lossy.
0 is the default value.
Flag that indicates whether to keep all dictionary symbols or remove unrepeated symbols from the dictionary. Possible values are:
Value | Meaning |
---|---|
JBIG2_TEXT_REMOVEUNREPEATEDSYM | [0x1000] Remove unrepeated symbols from the dictionary. When this flag is used those symbols in the dictionary which do not have any match in the bitmap are removed from the text dictionary to be encoded as non-text, resulting in a smaller file size. |
JBIG2_TEXT_KEEPALLSYM | [0x2000] Keep all dictionary symbols. |
The bitmap X resolution to be used when setting JBIG2 options.
The bitmap Y resolution to be used when setting JBIG2 options.
Flags that indicate whether to remove unwanted JBIG2 segments and whether to use the dictionary for text symbols. You can use a bit-wise OR ( | ) to specify more than one flag. Possible values are:
Value | Meaning |
---|---|
Removing the unwanted JBIG2 segments: | |
JBIG2_REMOVE_MARKER | [0x0001] Remove the two bytes marker from the generic region segment data. |
JBIG2_REMOVE_HEADER_SEGMENT | [0x0002] Remove the JBIG2 header. |
JBIG2_REMOVE_EOP_SEGMENT | [0x0004] Remove the End Of Page segment. |
JBIG2_REMOVE_EOF_SEGMENT | [0x0008] Remove the End Of File segment. |
Using dictionary for text symbols: | |
JBIG2_ENABLE_DICTIONARY | [0x0100] Enable the encoder to use the text symbol dictionary. |
pFILEJBIG2OPTIONS is a pointer to a FILEJBIG2OPTIONS structure. Where the function parameter type is pFILEJBIG2OPTIONS, declare a FILEJBIG2OPTIONS variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pFILEJBIG2OPTIONS variable is necessary only if the program requires a pointer.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document