This data type controls the precinct size when saving JPEG 2000 files.
This feature is available in version 16 or later.
typedef enum
{
J2KPRECINCTSIZE_FULL = 0,
J2KPRECINCTSIZE_UNIFORM_64 = 1,
J2KPRECINCTSIZE_UNIFORM_128 = 2,
J2KPRECINCTSIZE_UNIFORM_256 = 3,
J2KPRECINCTSIZE_UNIFORM_512 = 4,
J2KPRECINCTSIZE_UNIFORM_1024 = 5,
J2KPRECINCTSIZE_UNIFORM_2048 = 6,
J2KPRECINCTSIZE_HIERARCHICAL1_64 = 7,
J2KPRECINCTSIZE_HIERARCHICAL1_128 = 8,
J2KPRECINCTSIZE_HIERARCHICAL1_256 = 9,
J2KPRECINCTSIZE_HIERARCHICAL1_512 = 10,
J2KPRECINCTSIZE_HIERARCHICAL2_64 = 11,
J2KPRECINCTSIZE_HIERARCHICAL2_128 = 12,
J2KPRECINCTSIZE_HIERARCHICAL2_256 = 13,
J2KPRECINCTSIZE_HIERARCHICAL2_512 = 14,
} J2KPRECINCTSIZE, *pJ2KJ2KPRECINCTSIZE;
No precinct is used, size is infinite.
For all resolution levels, a precinct dimension of [X by X] will be applied.
A precinct size of [X by X] will be applied to the first(smallest) resolution of the image. The second resolution precinct dimension would be [2X by 2X]. The third resolution precinct dimension would be [4X by 4X] and so on.
So if the JPEG 2000 file has five levels and J2KPRECINCTSIZE_HIERARCHICAL1_64 is used, the precinct dimensions will be as follows:
A precinct size of [X by X] will be applied to the first and second (smallest) resolutions of the image. The third and fourth resolutions precinct dimension would be [2X by 2X] and so on.
So if the JPEG 2000 file has five levels and J2KPRECINCTSIZE_HIERARCHICAL2_64 is used, the precinct dimensions will be as follows:
Precincts are rectangular regions in the wavelet domain, within a given resolution level and image component that represent a spatial region on the image.
They are used for limiting the size of JPEG 2000 compressed packets and to provide a means to random access into a JPEG 2000 compressed stream. For this reason, they should be used for interactive transfer of JPEG 2000 files as in JPIP applications. In general, dividing the image into precincts is better than tiling it. So it is recommended that users compress the image as one tile and use precincts to divide the spatial region. This will give better compression ratios and image quality.
Using smaller precinct dimensions provides finer access to the compressed stream yet increases the compressed stream size. It is recommended to use J2KPRECINCTSIZE_HIERARCHICAL1_128 and no tiling to generate JPEG 2000 files for any purpose.
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