TranslateBitmapBits
[This is preliminary documentation and subject to change.]
The TranslateBitmapBits function translates the colors of a bitmap having a defined format so as to produce another bitmap in a requested format.
BOOL WINAPI TranslateBitmapBits(
HTRANSFORM hColorTransform,
PVOID pSrcBits,
BMFORMAT bmInput,
DWORD dwWidth,
DWORD dwHeight,
DWORD dwInputStride,
PVOID pDestBits,
BMFORMAT bmOutput,
DWORD dwOutputStride,
PBMCALLBACKFN pfnCallback,
ULONG ulCallbackData
);
Parameters
-
hColorTransform
-
Identifies the color transform to use.
-
pSrcBits
-
Pointer to the bitmap to translate.
-
bmInput
-
Specifies the format of the input bitmap. Must be set to one of the values of the BMFORMAT enumerated type.
-
dwWidth
-
Specifies the number of pixels per scan line in the input bitmap.
-
dwHeight
-
Specifies the number of scan lines in the input bitmap.
-
dwInputStride
-
Specifies the number of bytes from the beginning of one scan line to the beginning of the next in the input bitmap; if set to zero, the function assumes that scan lines are padded so as to be DWORD-aligned.
-
pDestBits
-
Pointer to the buffer in which to place the translated bitmap.
-
bmOutput
-
Specifies the format of the output bitmap. Must be set to one of the values of the BMFORMAT enumerated type.
-
dwOutputStride
-
Specifies the number of bytes from the beginning of one scan line to the beginning of the next in the output bitmap; if set to zero, the function assumes that scan lines should be padded to be DWORD-aligned.
-
pfnCallback
-
Pointer to a callback function called periodically by TranslateBitmapBits to report progress and allow the calling process to cancel the translation. (See ICMProgressProcCallback)
-
ulCallbackData
-
Data passed back to the callback function, for example, to identify the translation that is reporting progress.
Return Values
If this function succeeds, the return value is TRUE.
If this function fails, the return value is FALSE. For extended error information, call GetLastError.
Remarks
If the input and output formats are not compatible with the color transform, this function fails.
QuickInfo
Windows NT: Requires version 5.0 or later.
Windows: Requires Windows 98.
Windows CE: Unsupported.
Header: Declared in icm.h.
Import Library: Use mscms.lib.
See Also
Color Management Overview, ICM 2.0 Functions, ICMProgressProcCallback, Windows Bitmap Header Structures, BMFORMAT