Operation Structures > J2K_EXTRA, J2K_UNION |
J2K_EXTRA: OP_J2KE, OP_J2KE3D, OP_J2KERGB, OP_J2KP, OP_J2KP3D, OP_J2KPRGB
This structure must be zeroed and have ExtraSize set to sizeof(J2K_EXTRA) before use. To use this structure set PIC_PARM.opcodeExtraPtr to point to a valid J2K_EXTRA structure. If PIC_PARM.opcodeExtraPtr does not point to a J2K_EXTRA structure no information will be returned via opcodeExtraPtr.
Copy Code | |
---|---|
typedef struct { DWORD ExtraSize; double CaptureResVert; double CaptureResHorz; double DisplayResVert; double DisplayResHorz; } J2K_EXTRA ; |
Name | Description |
ExtraSize |
Must be the size of J2K_EXTRA in bytes. |
CaptureResVert |
Vertical Capture resolution in canvas grid points per meter. |
CaptureResHorz |
Horizontal Capture resolution in canvas grid points per meter. |
DisplayResVert |
Vertical Display resolution in canvas grid points per meter. |
DisplayResHorz |
Horizontal Display resolution in canvas grid points per meter. |
Copy Code | |
---|---|
typedef struct { DWORD Reserved0; BYTE PICHUGE* UpdatedTiles; BYTE PICHUGE* ColorSpecICCProfileData; BYTE PICHUGE* Reserved3; BYTE PICHUGE* Reserved4; BYTE PICHUGE* Reserved5; BYTE PICHUGE* Reserved6; BYTE PICHUGE* Reserved7; BYTE PICHUGE* Reserved8; PICFLAGS PicFlags; PICFLAGS PicFlags2 * following in reference grid coordinates */ DWORD ImageWidth; DWORD ImageHeight; DWORD ImageXOff; DWORD ImageYOff; DWORD StripSize; REGION Region; DWORD NumOtherPartitions; PARTITION PICHUGE* OtherPartitions; DWORD PartitionNum; DWORD TileWidth; DWORD TileHeight; DWORD TileXOff; DWORD TileYoff; TILE DftTile; DWORD NumOtherTiles; TILE PICHUGE* OtherTiles; DWORD Rate; THUMBNAIL Thumbnail; DWORD Resolution; DWORD CompFileSize; DWORD NumPartitions; DWORD ExpandLayers; double TargetPSNR; DWORD ExpandResolution; DWORD SliceOff; DWORD JPEG2000FileFormat; DWORD JPEG2000Profile; BYTE ColorSpecMethod; SBYTE ColorSpecPrecedence; BYTE ColorSpecApproximation; BYTE ColorSpecEnumeratedColorSpace; DWORD ColorSpecICCProfileLen; DWORD CompFileSizeHigh; } J2K_UNION; |
Name | Description | ||||||||||||||||||||||||||||||||||||||||||||
Reserved 0 |
Must be 0 | ||||||||||||||||||||||||||||||||||||||||||||
UpdatedTiles |
Ordinarily this is set by OP_JPIPCLIENT or OP_RIDP2. UpdatedTiles is a bitmap of updated 64x64 pixel subrectangles. All subrectangles denoted by a '1' bit are decompressed. If UpdatedTiles <> 0, then full image size output buffers are required. UpdatedTiles are disallowed in reduced-memory mode of the decompressor. For an image width W, the UpdatedTiles bit corresponding to pixel (x, y) is:
| ||||||||||||||||||||||||||||||||||||||||||||
ColorSpecICCProfileData |
Pointer to a valid ICC Profile. | ||||||||||||||||||||||||||||||||||||||||||||
Reserved3 Reserved4 Reserved5 Reserved6 Reserved7 Reserved8 |
Must be NULL. | ||||||||||||||||||||||||||||||||||||||||||||
PICFlags |
| ||||||||||||||||||||||||||||||||||||||||||||
PICFlags2 |
| ||||||||||||||||||||||||||||||||||||||||||||
The following four elements describe the size and position of the image on the reference grid or canvas. JPEG 2000 allows the upper-left corner to be assigned an arbitrary nonnegative position on a background reference grid. The positions of the other three corners are then constrained by this corner's position and the image dimensions. | |||||||||||||||||||||||||||||||||||||||||||||
ImageWidth |
This is the width of the image in pixels. | ||||||||||||||||||||||||||||||||||||||||||||
ImageHeight |
This is the height of the image in pixels | ||||||||||||||||||||||||||||||||||||||||||||
ImageXOff |
X-position of the image upper-left corner on the JPEG 2000 reference grid. A value of 0 is recommended unless there are specific reasons to do otherwise. The value must be nonnegative. | ||||||||||||||||||||||||||||||||||||||||||||
ImageYOff |
Y-position of the image upper-left corner on the JPEG 2000 reference grid. A value of 0 is recommended unless there are specific reasons to do otherwise. The value must be nonnegative | ||||||||||||||||||||||||||||||||||||||||||||
StripSize |
This is the minimum size of the buffer to hold data in the first partition. For OP_J2KP, this is the minimum size of the Get Buffer. For OP_J2KE, this is the minimum size of the Put buffer. This is provided to the caller on return from the REQ_INIT phase. | ||||||||||||||||||||||||||||||||||||||||||||
Region |
This is the region for the first partition. See Region below. For images with Width, Height, or Stride too large to fit in REGION, REGION2 should be used (see the discussion of the REGION2 structure) and ParmVerMinor must be at least 4. | ||||||||||||||||||||||||||||||||||||||||||||
The following three elements describe the partition structure for the uncompressed/decompressed image data. | |||||||||||||||||||||||||||||||||||||||||||||
NumOtherPartitions |
The number of OtherPartitions when there is more than one. This field is ignored when OtherPartitions is NULL. The PicParm.u.J2K.StripSize, PicParm.u.J2K.Region, and PicParm.Get or PicParm.Put queues specify the first partition's components explicitly, and this field specifies all other partitions' components. For OP_J2KP, the maximum allowed value for this field is 16383, because the JPEG2000 standard allows a maximum of 16384 components. For OP_J2KE, if the actual number of partitions required to decode the image is less than the number provided by the app, then the value of this field and the extraneous partitions are ignored and just the required number of partitions are decoded and returned. If the application provides fewer partitions than are required by the image, then just the partitions provided are decoded and returned. | ||||||||||||||||||||||||||||||||||||||||||||
OtherPartitions |
This is a pointer to an array of NumOtherPartition partitions, one for each partition after the first, making up the image. If this field is NULL, then only one partition is encoded or decoded. See Partition below. | ||||||||||||||||||||||||||||||||||||||||||||
PartitionNum |
This is the number designating which partition is the one to be used whenever a response code RES_GET_NEED_DATA or RES_PUT_NEED_SPACE is returned to the application. If the value is 0, for the first partition, then the PicParm.Get or PicParm.Put queue is being used along with the u.J2K.Region information. Otherwise the value indicates that the Get, Put, and Region structures in the designated partition are to be used for buffer manipulation etc. | ||||||||||||||||||||||||||||||||||||||||||||
The following four elements describe the size and position of the tile grid. This grid can be positioned arbitrarily with respect to both the image and the reference grid. | |||||||||||||||||||||||||||||||||||||||||||||
TileWidth |
This is the width of the tile. If 0 (recommended in most cases) then the tile width = ImageWidth | ||||||||||||||||||||||||||||||||||||||||||||
TileHeight |
This is the height of the tile. If 0 (recommended in most cases) then the tile height = ImageHeight | ||||||||||||||||||||||||||||||||||||||||||||
TileXOff |
X-position of the upper-left corner of the upper-leftmost tile on the JPEG 2000 reference grid. A value of 0 is recommended unless there are specific reasons to do otherwise. The value must be nonnegative and it is constrained to be greater than ImageXOff - TileWidth, but no greater than ImageXOff | ||||||||||||||||||||||||||||||||||||||||||||
TileYOff |
Y-position of the upper-left corner of the upper-leftmost tile on the JPEG 2000 reference grid. A value of 0 is recommended unless there are specific reasons to do otherwise. The value must be nonnegative and it is constrained to be greater than ImageYOff - TileHeight, but no greater than ImageYOff.. | ||||||||||||||||||||||||||||||||||||||||||||
DftTile |
Compression settings for all tiles. When implemented, exceptions for individual tiles can be specified in the OtherTiles array. See Tile. | ||||||||||||||||||||||||||||||||||||||||||||
NumOtherTiles |
Not implemented. The number of tiles in the OtherTiles array. | ||||||||||||||||||||||||||||||||||||||||||||
OtherTiles |
Not implemented. An array of special compression settings for particular tiles. These settings allow the u.J2K.DftTile settings to be overridden for particular tiles. | ||||||||||||||||||||||||||||||||||||||||||||
Rate |
(OP_J2KP) The number of thousandths of a bit per pixel in the compressed image - used to control degree of compression; overrides custom compression settings if set. If set to 0 and CompFileSize and TargetPSNR are 0, then the compressed file size is not arbitrarily limited in size but will depend on the compressibility of the image and on the other compression settings. | ||||||||||||||||||||||||||||||||||||||||||||
Thumbnail |
(OP_J2KE) power of 2 by which to scale down size. Allows for faster decompression to a smaller image size and requires less compressed image data depending on the progression ordering. | ||||||||||||||||||||||||||||||||||||||||||||
Resolution |
(OP_J2KE) Reserved. Current behavior is that a full-size image is returned but the Resolution number of highest-detail bitslice layers of the image are skipped resulting in a fuzzier image, but requiring less compressed image data depending on the progression ordering. Provides the same functionality as ExpandLayers, and is overridden by ExpandLayers if ExpandLayers is nonzero; therefore, use ExpandLayers instead of this field. | ||||||||||||||||||||||||||||||||||||||||||||
CompFileSize |
(OP_J2KP) Desired compressed file size in bytes; overrides Rate or custom compression settings if set. If 0 and TargetPSNR is 0, then the Rate field is used to determine compression size. If Rate is also 0, then the compressed file size is not arbitrarily limited in size but will depend on the compressibility of the image and on the other compression settings. | ||||||||||||||||||||||||||||||||||||||||||||
NumPartitions |
(OP_J2KE) After RES_DONE is returned from REQ_INIT, NumPartitions minus one is the number of OtherPartitions required to decompress all image components. If NumOtherPartitions < NumPartitions - 1, then the application could decompress all components by calling REQ_TERM to terminate the current OP_J2KE operation and could then start a new OP_J2KE operation on the same image after reallocating the OtherPartitions array and setting NumOtherPartitions. If REQ_EXEC is called and NumOtherPartitions < NumPartitions - 1, then the extra components aren't decompressed. | ||||||||||||||||||||||||||||||||||||||||||||
ExpandLayers |
(OP_J2KE) A full-size image is returned but the ExpandLayers number of highest-detail bitslice layers of the image are skipped resulting in a fuzzier image, but requiring less compressed image data depending on the progression ordering. | ||||||||||||||||||||||||||||||||||||||||||||
TargetPSNR |
(OP_J2KP) Set this to the desired compressed image quality as measured by Peak-Signal-to-Noise-Ratio. Overrides Rate and CompFileSize, if set. If 0, then either the Rate or CompFileSize is used to determine compression size. | ||||||||||||||||||||||||||||||||||||||||||||
ExpandResolution |
(OP_J2KE) A full-size image is returned but the ExpandResolution number of highest-detail wavelet decomposition levels of the image are skipped resulting in a fuzzier image, but requiring less compressed image data depending on the progression ordering. | ||||||||||||||||||||||||||||||||||||||||||||
SliceOff |
(J2K volumetric expand only) Set this to the offset of the first slice to expand. The number of slices to expand, starting from this offset, is determined by the number of partitions provided to the opcode. | ||||||||||||||||||||||||||||||||||||||||||||
JPEG2000FileFormat |
This field reports the JPEG2000 file format of the input JPEG2000 image. It is informational only and is returned by REQ_INIT.
| ||||||||||||||||||||||||||||||||||||||||||||
JPEG2000Profile |
This field reports the JPEG2000 profile as determined from indicators in the JPEG2000 image. It is informational only and is returned by REQ_INIT for the expand opcodes. It can be set before REQ_INIT for the pack opcodes when creating a JPEG2000 file. See the JPEG2000 ISO standard for more information about these profiles.
| ||||||||||||||||||||||||||||||||||||||||||||
ColorSpecEnumeratedColorSpace |
This field reports the Enumerated Color Space if ColorSpecMethod == J2K_COLOR_SPEC_METHOD_ECS. It is returned during REQ_INIT for the expand opcodes and is not used for the pack opcodes.
| ||||||||||||||||||||||||||||||||||||||||||||
ColorSpecMethod |
This field reports the JPEG2000 Color Specification Method as determined from the Color Specification Box in the JP2 Header box. It is returned by REQ_INIT for the expand opcodes. It can be set, only to J2K_COLOR_SPEC_METHOD_ICP, for the pack opcodes when creating a JPEG2000 file.
| ||||||||||||||||||||||||||||||||||||||||||||
ColorSpecPrecedence |
Reserved. Must be 0. | ||||||||||||||||||||||||||||||||||||||||||||
ColorSpecApproximation |
Reserved. Must be 0. | ||||||||||||||||||||||||||||||||||||||||||||
ColorSpecICCProfileLen |
The length in bytes of the ICC Profile in ColorSpecICCProfileData. | ||||||||||||||||||||||||||||||||||||||||||||
CompFileSizeHigh |
(OP_J2KP) Upper 32 bits of the desired compressed file size in bytes; appended to the value in CompFileSize to create a 64 bit value when needed for extremely large images. Be sure to set to zero when the compressed file size fits in CompFileSize or when CompFileSize is not being specified. |