Operation Structures > PNG_UNION |
PNG_UNION: OP_PNGE and OP_PNGP
The PNG_UNION structure supplies parameters to the OP_PNGE and OP_PNGP opcodes used for expanding PNG files to DIBs or Raw images and for compressing DIBs or Raw images to PNG files.
Copy Code | |
---|---|
typedef struct {
DWORD Reserved0;
BYTE PICHUGE* Reserved1;
BYTE PICHUGE* Reserved2;
BYTE PICHUGE* Reserved3;
BYTE PICHUGE* Reserved4;
BYTE PICHUGE* MaskBuffer;
BYTE PICHUGE* Reserved6;
BYTE PICHUGE* Reserved7;
BYTE PICHUGE* Reserved8;
PICFLAGS PicFlags;
PICFLAGS PicFlags2;
REGION Region;
LONG StripSize;
DWORD FilterSampleSize;
DWORD AlphaBpp;
DWORD AlphaStride;
DWORD BytesRem;
BYTE Background[6];
BYTE Trans[6];
BYTE LastTrans;
BYTE Action;
BYTE Filter;
BYTE BitDepth;
DWORD MinReadData;
WORD Palette_Entries;
WORD ResolutionUnit;
DWORD XResolution;
DWORD YResolution;
RGBQUAD16 BackgroundColorRGB;
RGBQUAD16 TransparentColorRGB;
LONG BackgroundColorIndex;
BYTE Interlace;
} PNG_UNION; |
Name | Description | ||||||||||||||
Reserved0 |
This field is not currently used and must be set to 0. | ||||||||||||||
Reserved1 Reserved2 Reserved3 Reserved4 Reserved5 Reserved6 Reserved7 Reserved8 |
These fields are not used and must be set to NULL. | ||||||||||||||
PicFlags |
Flags that control or report on the operation.
| ||||||||||||||
PicFlags2 |
Flags that control or report on the OP_PNGE operation.
| ||||||||||||||
StripSize |
Following REQ_INIT, this is set to the size of one input strip.
| ||||||||||||||
FilterSampleSize |
Reserved for opcode use. | ||||||||||||||
AlphaBpp |
Number of bits per pixel, before possibly being modified by the presence of F_Bmp or PF2_RetrieveAlpha. Set by OP_PNGE during REQ_INIT. The number of bits per pixel, after being adjusted for F_Bmp and PF2_RetrieveAlpha, will be placed into Region.Bpp during REQ_INIT. | ||||||||||||||
AlphaStride |
This field is set by OP_PNGE during REQ_INIT. The value is calculated as the stride needed to include an Alpha channel. If you set PF2_RetrieveAlpha after REQ_INIT but before REQ_EXEC, use AlphaStride when correcting Region.Stride and StripSize according to the output image. Divide StripSize by Stride, set Stride to the value of AlphaStride, then multiply StripSize by the new Stride. | ||||||||||||||
BytesRem Background[] Trans[] LastTrans Action |
Reserved for opcode use. | ||||||||||||||
Filter |
| ||||||||||||||
BitDepth |
This is the number of bits per component. | ||||||||||||||
MinReadData |
Reserved for opcode use. | ||||||||||||||
Palette_Entries |
Reserved, set to 0. | ||||||||||||||
ResolutionUnit |
ResolutionUnit = 0 and non-zero XResolution/YResolution specifies the Aspect Ratio of Width / Height, otherwise ResolutionUnit = 1 and non-zero XResolution/YResolution are pixels per meter. | ||||||||||||||
XResolution |
Horizontal Pixels / Resolution Unit | ||||||||||||||
YResolution |
Vertical Pixels / Resolution Unit | ||||||||||||||
BackgroundColorRGB |
| ||||||||||||||
TransparentColorRGB |
| ||||||||||||||
BackgroundColorIndex |
For color-mapped images, OP_PNGE will set this to the index of the background color. | ||||||||||||||
Interlace |
|