Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

J2KPRECINCTSIZE

Show in webframe

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.

Value

Meaning

J2KPRECINCTSIZE_FULL

No precinct is used, size is infinite.

J2KPRECINCTSIZE_UNIFORM_X

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

J2KPRECINCTSIZE_HIERARCHICAL1_X

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:

[64x64]  level 1
[128x128]  level 2
[256x256]  level 3
[512x512]  level 4
[1024x1024]  level 5

J2KPRECINCTSIZE_HIERARCHICAL2_X

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:

[64x64]  level 1
[64x64]  level 2
[128x128]  level 3
[128x128]  level 4
[256x256]  level 5

 

 

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.

 

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.