The StretchDIB function copies a device independent bitmap from one memory location to another and resizes the image to fit the destination rectangle.
void StretchDIB( LPBITMAPINFOHEADER biDst, LPVOID lpDst, int DstX, int DstY, int DstXE, int DstYE, LPBITMAPINFOHEADER biSrc, LPVOID lpSrc, int SrcX, int SrcY, int SrcXE, int SrcYE );
Pointer to a BITMAPINFOHEADER structure that describes the destination bitmap.
Pointer to the memory buffer that will receive the copied pixel bits.
X coordinate of the destination rectangle's origin.
Y coordinate of the destination rectangle's origin.
Width, in pixels, of the destination rectangle.
Height, in pixels, of the destination rectangle.
Pointer to a BITMAPINFOHEADER structure that describes the source bitmap.
Pointer to the source bitmap data.
X coordinate of the source rectangle's origin.
Y coordinate of the source rectangle's origin.
Width, in pixels, of the source rectangle.
Height, in pixels, of the source rectangle.
This function does not return a value.
The size of the destination buffer must be large enough to accommodate any alignment bytes at the end of each pixel row.
This function does nothing if biSrc and biDst have different values for biBitCount or if the value for biSrc. biBitCount does not equal 8, 16, or 24.
This function performs no dithering or other smoothing. Pixel values are merely dropped or duplicated on a line-by-line, column-by-column basis.
This function does not do any special processing based on pixel encoding except for calculating the number of bits per pixel. In particular this function will not generate correct results when pixels are encoded in groups of more than 1 pixel, as in the case of a YUV format where U and V are decimated and so are not represented equally in each pixel.
Before including Vfw.h, you must add the following line to your code:
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|