Operation Structures > LOSSLESS3 |
The LOSSLESS3 structure supplies parameters to the following:
The LOSSLESS3 structure supplies parameters to the OP_LIE3 and OP_LIE3PLUS opcodes used for expanding IMStar or lossless JPEG images to DIBs.
Copy Code | |
---|---|
typedef struct {
DWORD Reserved0;
LAYER PICHUGE* Layer;
BYTE PICHUGE* AHT;
BYTE PICHUGE* Reserved3;
RGBQUAD PICHUGE* UniversalCT;
BYTE PICHUGE* Reserved5;
BYTE PICHUGE* Reserved6;
BYTE PICHUGE* Reserved7;
BYTE PICHUGE* Reserved8;
PICFLAGS PicFlags;
PICFLAGS PicFlags2;
REGION Region;
LONG StripSize;
SHORT NumUC;
SBYTE MinLayerWanted;
SBYTE CurrentLayer;
BYTE RestartLo;
BYTE RestartHi;
BYTE ProgHeight;
BYTE NumRestarts;
DWORD RestartOff[4];
PICXSHORT NumOfPages;
PICXSHORT PageNum;
SHORT Transparent;
SHORT UserDelay;
PICXSHORT XOff;
PICXSHORT YOff;
BYTE DispMethod;
BYTE AllowedBitErr;
BYTE CompMethod;
BYTE CompOrder;
BYTE PTuning;
BYTE Channel;
BYTE IOPixType;
BYTE NativeBpp;
DWORD RestartCount;
DWORD SetBits;
DWORD PICHUGE* PixelMap;
BYTE EffectiveBpp;
BYTE PrecisionUCT;
BYTE Reserved9[2];
DWORD AHTLen;
DWORD AppsToOmit;
DWORD NumUC2;
LONG ImageWidth;
LONG ImageHeight;
} LOSSLESS3; |
Name | Description | ||||||||||||||
Reserved0 Layer AHT Reserved3 |
These fields are not currently used by OP_LIE3 and must be set to 0. | ||||||||||||||
UniversalCT |
UniversalCT allows the application to specify a translation from input pixel gray scale or color component brightness levels to corresponding output pixel values. The number of elements in the translation array is NumUC2. The precision in bits of each element is PrecisionUCT:
The input gray level is interpolated to obtain the zero-based index into the UniversalCT table:
| ||||||||||||||
Reserved5 Reserved6 Reserved7 Reserved8 |
These fields are not currently used and must be set to 0. | ||||||||||||||
PicFlags |
Flags that control or report on the OP_LIE3 operation.
| ||||||||||||||
PicFlags2 |
Additional Flags that control or report on the OP_LIE3 operation.
| ||||||||||||||
Region |
OP_LIE3 returns the image's characteristics in this structure and in PIC_PARM.Head. For images with stride greater than 32767, REGION2 should be used (see the discussion of the REGION2 structure) and ParmVerMinor must be at least 4. | ||||||||||||||
StripSize |
Prior to REQ_INIT, indicates the minimum strip length in bytes. Upon RES_PUT_NEED_SPACE, indicates the strip length in bytes for the current layer only. After REQ_INIT, indicates the maximum strip length in bytes and the minimum PUT queue size. | ||||||||||||||
NumUC |
This field has been deprecated and must be set to 0. Use NumUC2 instead. | ||||||||||||||
MinLayerWanted CurrentLayer RestartLo RestartHi ProgHeight NumRestarts RestartOff |
These fields are not currently used by OP_LIE3 and must be set to 0. | ||||||||||||||
NumOfPages |
For PIC2 input files only, a comment stored with the image to indicate the cardinality of a set of images to which the current image belongs. This value is reported, but otherwise ignored. | ||||||||||||||
PageNum |
For PIC2 input files only, a comment stored in the image to identify the current image in a set of images to which it belongs. This value is reported, but otherwise ignored. | ||||||||||||||
Transparent |
For PIC2 input files only, a comment stored with the image to denote the intended transparent color index. This value is reported, but otherwise ignored. When presenting the current image as an overlay upon another image, the pixels in the current image whose color index match this value should not obscure coinciding pixels of the overlaid image. | ||||||||||||||
UserDelay |
For PIC2 input files only, a comment stored with the image to indicate the intended count of 10ms intervals to wait before replacing the current image with the next image. This value is reported, but otherwise ignored. When presenting the current image in a series of images, the next image should not be displayed until this delay has elapsed. | ||||||||||||||
XOff |
For PIC2 input files only, a comment stored with the image to indicate its intended overlay horizontal offset. This value is reported, but otherwise ignored. When presenting the current image as an overlay upon another image, the left edge of the current image should be horizontally offset from the left edge of the overlaid image by this amount. | ||||||||||||||
YOff |
For PIC2 input files only, a comment stored with the image to indicate its intended overlay vertical offset. This value is reported, but otherwise ignored. When presenting the current image as an overlay upon another image, the top edge of the current image should be vertically offset from the top edge of the overlaid image by this amount. | ||||||||||||||
DispMethod |
For PIC2 input files only, a comment stored with the image to indicate its intended disposition method. This value is reported, but otherwise ignored. When presenting the current image with a series of images, this transition technique should be used to replace the current image with the next image. | ||||||||||||||
AllowedBitErr |
The number of least significant bits that were masked off of each pixel’s gray level before compression. Non-zero AllowedBitErr values imply lossy image compression; the original image cannot be recovered losslessly. See the LOSSLESS3: OP_LIP3 section for a description of the meaning of AllowedBitErr during compression. | ||||||||||||||
CompMethod |
The method used to compress the image.
See the LOSSLESS3: OP_LIP3 section for a description of the meaning of CompMethod during compression. | ||||||||||||||
CompOrder |
A compression tuning parameter:
See the LOSSLESS3: OP_LIP3 section for a description of the meaning of CompOrder during compression. | ||||||||||||||
PTuning Channel |
These fields are not currently used by OP_LIE3 and must be set to 0. | ||||||||||||||
IOPixType |
Instructs OP_LIE3 to convert decompressed image pixels to the specified type. IOPixType is only used with lossless JPEG images that use compression order 1, lack restart markers, and possess an effective bit depth of 8bpp. When a UniversalCT table is provided, IOPixType is ignored. | ||||||||||||||
NativeBpp |
The native bits per pixel of the compressed image. | ||||||||||||||
RestartCount |
The number of pixels between restart markers. | ||||||||||||||
SetBits PixelMap EffectiveBpp |
These fields are used internally and must be set to 0. | ||||||||||||||
PrecisionUCT |
Establishes the precision of UniversalCT values. When PrecisionUCT is different than the output pixel precision, typically Region.Bpp, each UniversalCT element is interpolated into the valid pixel range. | ||||||||||||||
Reserved9 AHTLen AppsToOmit |
These fields are not currently used by OP_LIE3 and must be set to 0. | ||||||||||||||
NumUC2 |
The number of universal colors in UniversalCT. If setting this field, ensure that NumUC is 0. | ||||||||||||||
ImageWidth |
Original width of the image, in pixels, before cropping. | ||||||||||||||
ImageHeight |
Original height of the image, in pixels, before cropping. |
The LOSSLESS3 structure supplies parameters to the OP_LIP3 and OP_LIP3PLUS opcodes used for compressing DIB or RAW image data to Lossless JPEG or IMStar images.
Copy Code | |
---|---|
typedef struct {
DWORD Reserved0;
LAYER PICHUGE* Layer;
BYTE PICHUGE* AHT;
BYTE PICHUGE* Reserved3;
RGBQUAD PICHUGE* UniversalCT;
BYTE PICHUGE* Reserved5;
BYTE PICHUGE* Reserved6;
BYTE PICHUGE* Reserved7;
BYTE PICHUGE* Reserved8;
PICFLAGS PicFlags;
PICFLAGS PicFlags2;
REGION Region;
LONG StripSize;
SHORT NumUC;
SBYTE MinLayerWanted;
SBYTE CurrentLayer;
BYTE RestartLo;
BYTE RestartHi;
BYTE ProgHeight;
BYTE NumRestarts;
DWORD RestartOff[4];
PICXSHORT NumOfPages;
PICXSHORT PageNum;
SHORT Transparent;
SHORT UserDelay;
PICXSHORT XOff;
PICXSHORT YOff;
BYTE DispMethod;
BYTE AllowedBitErr;
BYTE CompMethod;
BYTE CompOrder;
BYTE PTuning;
BYTE Channel;
BYTE IOPixType;
BYTE NativeBpp;
DWORD RestartCount;
DWORD SetBits;
DWORD PICHUGE* PixelMap;
BYTE EffectiveBpp;
BYTE PrecisionUCT;
BYTE Reserved9[2];
DWORD AHTLen;
DWORD AppsToOmit;
DWORD NumUC2;
LONG ImageWidth;
LONG ImageHeight;
} LOSSLESS3; |
Name | Description | ||||||||||||||||
Reserved0 Layer |
These fields are not used by OP_LIP3 and must be set to 0. | ||||||||||||||||
AHT |
Points to an optional Abbreviated Huffman Table that is used when PF_SkipHuffman is set in PicFlags. The length of the table must be assigned to AHTLen. | ||||||||||||||||
Reserved3 UniversalCT Reserved5 Reserved6 Reserved7 Reserved8 |
These fields are not currently used and must be set to 0. | ||||||||||||||||
PicFlags |
Flags that control or report on the OP_LIP3 operation.
| ||||||||||||||||
PicFlags2 |
Additional flags that control or report on the OP_LIP3 operation.
| ||||||||||||||||
Region |
If F_Raw is set in PIC_PARM.Flags, then this structure describes the image characteristics and PIC_PARM.Head is not used. For images with a stride greater than 32767, REGION2 should be used (see the discussion of the REGION2 structure) and ParmVerMinor must be at least 4. | ||||||||||||||||
StripSize |
After REQ_INIT, indicates the maximum strip length in bytes and the minimum GET queue size. | ||||||||||||||||
NumUC MinLayerWanted CurrentLayer RestartLo RestartHi ProgHeight NumRestarts RestartOff |
These fields are not used by OP_LIP3 and must be set to 0. | ||||||||||||||||
NumOfPages |
For PIC2 output files only, a comment stored with the image to indicate the cardinality of a set of images to which the current image belongs. | ||||||||||||||||
PageNum |
For PIC2 output files only, a comment stored with the image to identify the current image in a set of images to which it belongs. | ||||||||||||||||
Transparent |
For PIC2 output files only, a comment stored with the image to denote the intended transparent color index. The value -1 indicates no transparent color is used. A value is not written unless PF_ApplyTransparency is set in PicFlags. When presenting the current image as an overlay upon another image, the pixels in the current image whose color index match this value should not obscure coinciding pixels of the overlaid image. | ||||||||||||||||
UserDelay |
For PIC2 output files only, a comment stored with the image to indicate the intended count of 10ms intervals to display the current image. When presenting the current image in a series of images, the next image should not be displayed until this delay has elapsed. | ||||||||||||||||
XOff |
For PIC2 output files only, a comment stored with the image to indicate its intended overlay horizontal offset. When presenting the current image as an overlay upon another image, the left edge of the current image should be horizontally offset from the left edge of the overlaid image by this amount. | ||||||||||||||||
YOff |
For PIC2 output files only, a comment stored with the image to indicate its intended overlay vertical offset. When presenting the current image as an overlay upon another image, the top edge of the current image should be vertically offset from the top edge of the overlaid image by this amount. | ||||||||||||||||
DispMethod |
For PIC2 output files only, a comment stored with the image to indicate its intended disposition method. When presenting the current images with a series of images, this transition technique should be used to replace the current image with the next image. | ||||||||||||||||
AllowedBitErr |
Use AllowedBitErr to filter noise or other low-intensity variations from grayscale images. Non-zero AllowedBitErr values indicate the number of least significant bits to mask from each pixel’s gray level prior to compression. This may improve the compression and, in some cases, the appearance of the image. However, non-zero AllowedBitErr values imply lossy image compression; the original image cannot be recovered losslessly. AllowedBitErr must be 0 for non-grayscale images. | ||||||||||||||||
CompMethod |
Must be set to one of the compression methods listed in the table below or left as 0, which is equivalent to METHOD_AUTO.
| ||||||||||||||||
CompOrder |
For lossless JPEG, CompOrder specifies the predictor value. The value may be between 1 and 7, inclusively. For best performance set to 1. For IMStar compression, CompOrder specifies the order, or length, of the context that used to predict the image pixels. The value may be between 0 and 4, inclusively. When 0, an order of 4 will be used. For Lossless LOCO, this value is ignored. | ||||||||||||||||
PTuning Channel |
These fields are not currently used by OP_LIP3 and must be set to 0. | ||||||||||||||||
IOPixType |
After REQ_EXEC, indicates the pixel type of the output image. | ||||||||||||||||
NativeBpp |
After REQ_EXEC, indicates the native bit depth of the output image. | ||||||||||||||||
RestartCount |
This field is not currently used by OP_LIP3 and must be set to 0. | ||||||||||||||||
SetBits PixelMap EffectiveBpp |
These fields are used internally by OP_ LIP3 and must be set to 0. | ||||||||||||||||
PrecisionUCT Reserved9 |
These fields are not currently used by OP_LIP3 and must be set to 0. | ||||||||||||||||
AHTLen |
The length, in bytes, of the AHT buffer. | ||||||||||||||||
AppsToOmit |
This bit flag field indicates which application markers should be omitted. Set bit 0 to exclude the LJIF App0 marker from the output stream. | ||||||||||||||||
NumUC2 ImageWidth ImageHeight |
These fields are not currently used by OP_LIP3 and must be set to 0. |