J2KPRECINCTSIZE

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; 

This data type is used within the FILEJ2KOPTIONS structure to control the precinct size when saving JPEG 2000 files.

This feature is available in version 16 or later.

Members

J2KPRECINCTSIZE_FULL

No precinct is used, size is infinite.

J2KPRECINCTSIZE_UNIFORM_XXXX

For all resolution levels, a precinct dimension of [X by X] will be applied.

J2KPRECINCTSIZE_HIERARCHICAL1_XXX

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:

J2KPRECINCTSIZE_HIERARCHICAL2_XXX

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 definition and recommendation

(This feature is available in version 16 or later.)

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 Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help