Operation Structures > D2F_STRUC |
D2F_STRUC: OP_D2F, OP_D2FPLUS
The D2F_STRUC supplies parameters to the OP_D2F opcode used to convert DIBs to supported file formats (e.g., GIF, TIFF, etc.).
Copy Code | |
---|---|
typedef struct {
DWORD Reserved0;
BYTE PICHUGE* AuxSpace;
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;
DWORD AllocType;
DWORD AuxSize;
DWORD ImageType;
DWORD Compression;
DWORD PNG_Progressive;
DWORD PNG_Filter;
DWORD ApplyAux;
DWORD OutBpp;
DWORD Expansion1;
DWORD Expansion2;
DWORD MultiImageSize;
BYTE TransparentColorIndex;
BYTE NegateImage;
BYTE Dimension;
BYTE DisposalMethod;
DWORD RowsPerStrip;
LONG LumFactor;
LONG ChromFactor;
SUBSAMPLING SubSampling;
LONG Predictor;
WORD DelayTime;
BYTE BackgroundColor;
BYTE AspectRatio;
DWORD WidthPad;
WORD LogicalScreenWidth;
WORD LogicalScreenHeight;
WORD ImageLeftPosition;
WORD ImageTopPosition;
DWORD YieldEvery;
DWORD IFDOffset;
DWORD InsertAfterIFDOffset;
DWORD TIFFFirstByte;
} D2F_STRUC; |
Name | Description | ||||||||||||||||||||||||||||||||
Reserved0 |
This field is not currently used and must be set to 0. | ||||||||||||||||||||||||||||||||
AuxSpace |
AuxSpace may be set to point to a block of memory whose size is AuxSize. This block of memory must be organized as a sequential series of one or more 'chunks'. Each chunk consists of a DWORD Tag, followed by a DWORD Length, followed by Length bytes of data. Thus the total length of each chunk is Length + 8. AuxSize is the sum of all the chunk(s) total lengths. If ApplyAux is not 0, then chunks whose type is recognized as appropriate by OP_D2F will be embedded into the output image. AuxSpace is currently ignored except for BMP output. AUX_BMP_EXTRABI is currently the only appropriate Tag. See the OP_D2F BMP Output section for additional information. | ||||||||||||||||||||||||||||||||
Reserved2 Reserved3 Reserved4 |
These fields are not currently used and must be set to 0. | ||||||||||||||||||||||||||||||||
MaskBuffer |
If PF2_UseAlphaMask is set in PicFlags2, MaskBuffer must point to a buffer with which to blend. | ||||||||||||||||||||||||||||||||
Reserved6 Reserved7 Reserved8 |
These fields are not currently used and must be set to 0. | ||||||||||||||||||||||||||||||||
PicFlags |
Flags that control the OP_D2F operation.
| ||||||||||||||||||||||||||||||||
PicFlags2 |
Flags that control the OP_D2F operation.
| ||||||||||||||||||||||||||||||||
AllocType |
If non-zero, all input data must be present in the Get queue before REQ_EXEC. OP_D2F may advance the Get.Front pointer as it processes the input data. If so, the input data preceding Get.Front should not be considered to have been consumed by OP_D2F and that data must not be modified. Even though the entire input image is present, OP_D2F may issue RES_SEEK events. If so, these events can be handled as:
If AllocType is 0, then a smaller input queue may be used which does not contain all the input image data. In that case, OP_D2F may issue RES_SEEK events to access non-sequential locations in the input image. Assuming that the input image data resides in an open file, these RES_SEEK events might be handled as:
| ||||||||||||||||||||||||||||||||
AuxSize |
The total length of all chunks pointed to by AuxSpace. | ||||||||||||||||||||||||||||||||
ImageType |
Specifies the desired type of output file to create.
| ||||||||||||||||||||||||||||||||
Compression (TIFF output only) |
Compression allows the TIFF output image to use one of several of compression algorithms.
| ||||||||||||||||||||||||||||||||
Dimension (TIFF output only) |
If G3 compression is selected (Compression is 3), the compression will be 2-D if Dimension is 2, otherwise it will be 1-D. | ||||||||||||||||||||||||||||||||
PNG_Progressive PNG_Filter |
These fields are not currently used and must be set to 0. | ||||||||||||||||||||||||||||||||
ApplyAux |
Non-zero to apply any data pointed to by AuxSpace. | ||||||||||||||||||||||||||||||||
OutBpp |
If ImageType is BI_TGA, and the input image is 24 bits-per-pixel, then OutBpp may be 16 or 24 to specify the Targa output image bits-per-pixel. In all other cases, OutBpp is ignored. | ||||||||||||||||||||||||||||||||
Expansion1 (TIFF output only) |
Byte ordering:
CMYK output (32 bits-per-pixel input image only):
| ||||||||||||||||||||||||||||||||
Expansion2 (TIFF output only) |
X/Y resolution tags:
| ||||||||||||||||||||||||||||||||
MultiImageSize (TIFF output only) |
If PF_MultiImage is set in PicFlags, then MultiImageSize can be set to the size of the existing TIFF file to which this output image is to be appended. This is an optimization which relieves OP_D2F of having to determine the existing TIFF file size by reading to the end of the existing file. | ||||||||||||||||||||||||||||||||
TransparentColorIndex (GIF output only) |
If PF_ApplyTransparency is set in PicFlags, then a GIF89a Graphics Extension block is output using this value for the transparent color index. | ||||||||||||||||||||||||||||||||
NegateImage (TIFF output only) |
If NegateImage is not 0 for a TIFF output image compressed with G3 or G4, then the negative of the input image is saved. Otherwise, the input color with the greater luminance is saved as white and the other input color is saved as black. | ||||||||||||||||||||||||||||||||
Predictor (TIFF output only) |
If LZW or Deflate compression is selected (Compression is 5 or 8, respectively), TIFF horizontal differencing will be used if Predictor is 2, otherwise there will be no prediction. | ||||||||||||||||||||||||||||||||
LumFactor (TIFF output only) |
If JPEG compression is selected (Compression is 6 or 7), LumFactor should specify the luminance compression factor between 0 and 255. | ||||||||||||||||||||||||||||||||
ChromFactor (TIFF output only) |
If JPEG compression is selected (Compression is 6 or 7), ChromFactor should specify the luminance compression factor between 0 and 255. | ||||||||||||||||||||||||||||||||
SubSampling (TIFF output only) |
If JPEG compression is selected (Compression is 6 or 7), SubSampling should specify the subsampling method.
| ||||||||||||||||||||||||||||||||
DisposalMethod (GIF output only) |
DisposalMethod will be output within a GIF89a Graphics Extension block to indicate what should occur after the graphic is displayed. | ||||||||||||||||||||||||||||||||
RowsPerStrip (TIFF output only) |
If not zero, RowsPerStrip will be the number of rows per strip. | ||||||||||||||||||||||||||||||||
DelayTime (GIF output only) |
DelayTime will be output within a GIF89a Graphics Extension block specifying the time (in hundredths of a second) to wait before continuing processing the data stream, between 0 and 65535. | ||||||||||||||||||||||||||||||||
BackgroundColor (GIF output only) |
BackgroundColor specifies the background color index. | ||||||||||||||||||||||||||||||||
AspectRatio (GIF output only) |
If not zero, AspectRatio is a value specifying the a pixel aspect ratio related to actual pixel aspect ratio by PixelAspectRatio = PixelWidth/PixelHeight = (AspectRatio+ 15) / 64 | ||||||||||||||||||||||||||||||||
WidthPad (GIF output only) |
If PF_WidthPadKnown is set in PicFlags, the WidthPad will be the byte width of one row, overriding DIB padding. | ||||||||||||||||||||||||||||||||
LogicalScreenWidth (GIF output only) |
If not zero, LogicalScreenWidth will be the logical screen width placed into the GIF header. | ||||||||||||||||||||||||||||||||
LogicalScreenHeight (GIF output only) |
If not zero, LogicalScreenHeight will be the logical screen height placed into the GIF header. | ||||||||||||||||||||||||||||||||
ImageLeftPosition (GIF output only) |
ImageLeftPosition will be image left position (column number of left edge of the image) placed into the GIF image descriptor, with 0 being the left-most column. | ||||||||||||||||||||||||||||||||
ImageTopPosition (GIF output only) |
ImageTopPosition will be image top position (row number of top edge of the image) placed into the GIF image descriptor, with 0 being the top-most row. | ||||||||||||||||||||||||||||||||
YieldEvery |
If PF_YieldGet is set in PicFlags, then OP_D2F returns a RES_PUT_DATA_YIELD response after every YieldEvery lines have been output to the Put queue. | ||||||||||||||||||||||||||||||||
IFDOffset (TIFF output only) |
IFDOffset is set by OP_D2F to the file offset of the TIFF IFD written. | ||||||||||||||||||||||||||||||||
InsertAfterIFDOffset (TIFF output only) |
InsertAfterIFDOffset should be set to the file offset of the start of the IFD after which the new image should be inserted. If the value is TIFF_INSERT_AS_FIRST, the image will be inserted as the first in the file. If the value is TIFF_INSERT_AS_LAST, the image will be appended to the file. | ||||||||||||||||||||||||||||||||
TIFFFirstByte (TIFF output only) |
When adding a new image to an existing TIFF file, TIFFFirstByte may be set to the first byte of the file (either 'I' or 'M' for little- or big-endian byte order) for more efficient operation. |