2.3.1.6 META_STRETCHDIB Record

The META_STRETCHDIB record specifies the transfer of color data from a block of pixels in device-independent format according to a raster operation, with possible expansion or contraction.

The source of the color data is a DIB, and the destination of the transfer is the current output region in the playback device context.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

RecordSize

RecordFunction

RasterOperation

...

ColorUsage

SrcHeight

SrcWidth

YSrc

XSrc

DestHeight

DestWidth

yDst

xDst

DIB (variable)

...

RecordSize (4 bytes): A 32-bit unsigned integer that defines the number of WORDs in the record.

RecordFunction (2 bytes): A 16-bit unsigned integer that defines this WMF record type. The lower byte MUST match the lower byte of the RecordType Enumeration (section 2.1.1.1) value META_STRETCHDIB.

RasterOperation (4 bytes): A 32-bit unsigned integer that defines how the source pixels, the current brush in the playback device context, and the destination pixels are to be combined to form the new image. This code MUST be one of the values in the Ternary Raster Operation Enumeration (section 2.1.1.31).

ColorUsage (2 bytes): A 16-bit unsigned integer that defines whether the Colors field of the DIB contains explicit RGB values or indexes into a palette. This value MUST be in the ColorUsage Enumeration (section 2.1.1.6).

SrcHeight (2 bytes): A 16-bit signed integer that defines the height, in logical units, of the source rectangle.

SrcWidth (2 bytes): A 16-bit signed integer that defines the width, in logical units, of the source rectangle.

YSrc (2 bytes): A 16-bit signed integer that defines the y-coordinate, in logical units, of the source rectangle.

XSrc (2 bytes): A 16-bit signed integer that defines the x-coordinate, in logical units, of the source rectangle.

DestHeight (2 bytes): A 16-bit signed integer that defines the height, in logical units, of the destination rectangle.

DestWidth (2 bytes): A 16-bit signed integer that defines the width, in logical units, of the destination rectangle.

yDst (2 bytes): A 16-bit signed integer that defines the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.

xDst (2 bytes): A 16-bit signed integer that defines the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.

DIB (variable): A variable-sized DeviceIndependentBitmap Object (section 2.2.2.9) that is the source of the color data.

The source image in the DIB is specified in one of the following formats:

  • An array of pixels with a structure specified by the ColorUsage field and information in the DeviceIndependentBitmap header.

  • A JPEG image [JFIF].<52>

  • A PNG image [W3C-PNG].<53>

If the image format is JPEG or PNG, the ColorUsage field in this record MUST be set to DIB_RGB_COLORS, and the RasterOperation field MUST be set to SRCCOPY.

See section 2.3.1 for the specification of additional bitmap records.

Show: