L_ColorMergeBitmap (original) (raw)
Summary
Creates a color bitmap by merging grayscale bitmaps that were created as color separations. You can use this to recombine the bitmaps that the L_ColorSeparateBitmap function creates.
Syntax
#include "l_bitmap.h"
L_LTIMGCLR_API L_INT L_ColorMergeBitmap(pBitmap, ppBitmap, uStructSize, uFlags)
Parameters
pBITMAPHANDLE pBitmap
Pointer to the bitmap handle referencing the target bitmap.
pBITMAPHANDLE *ppBitmap
An array of pointers to the bitmap handles referencing the bitmaps to be merged.
L_UINT uStructSize
Size in bytes, of the structure pointed to by pBitmap
, for versioning. Use sizeof(BITMAPHANDLE).
The pointers in the array should be in the appropriate order, which in most cases is the order of the letters in the name. For example, for CMY separation, the first pointer should be for the cyan plane, the second for magenta, and the third for yellow. The only exception is RGB, which should be in BGR (blue, green, red) order.
L_UINT uFlags
The type of separation that was used to create the grayscale images. Valid values are:
Value | Meaning |
---|---|
COLORSEP_RGB | [0x0000] Merge images from three RGB planes. |
COLORSEP_CMYK | [0x0001] Merge images from four CMYK planes. |
COLORSEP_HSV | [0x0002] Merge images from three HSV planes. |
COLORSEP_HLS | [0x0003] Merge images from three HLS planes. |
COLORSEP_CMY | [0x0004] Merge images from three CMY planes. |
COLORSEP_YUV | [0x0005] Merge images from three YUV planes. |
COLORSEP_XYZ | [0x0006] Merge images from three XYZ planes. |
COLORSEP_LAB | [0x0007] Merge images from three LAB planes. |
COLORSEP_YCrCb | [0x0008] Merge images form three YCrCb planes. |
COLORSEP_SCT | [0x0009] Merge images form three SCT planes. |
Returns
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Comments
This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.
The supported color-space models are RGB, CMYK, CMY, HSV, HLS, YUV, XYZ, LAB, YCrCb and SCT.
If all the bitmaps of ppBitmap
array are 16 bits grayscale bitmaps then the resulting bitmap is 48 bits per pixel, otherwise the resulting bitmap is 24 bits per pixel.
To update a status bar or detect a user interrupt during execution of this function, refer to L_SetStatusCallback.
This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available in the Document and Medical Imaging toolkits.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
Color Merge Function - Before
Color Merge Function - After
View additional platform support for this Color Merge function.
Required DLLs and Libraries
- LTIMGCLR
- For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
Platforms
Win32, x64, Linux.
See Also
Functions
- L_ColorSeparateBitmap
- L_ConvertColorSpace
- L_DlgColorRes
- L_WindowLevel
- L_ChannelMix
- L_DeinterlaceBitmap
- L_DesaturateBitmap
- L_EdgeDetectStatisticalBitmap
- L_LightControlBitmap
- L_SmoothEdgesBitmap
- L_AutoColorLevelBitmap
- L_ColorLevelBitmap
- L_CorrelationBitmap
- L_GrayScaleToDuotone
- L_GrayScaleToMultitone
- L_HolesRemovalBitmapRgn
- L_SelectiveColorBitmap
- L_SkeletonBitmap
Topics
- Processing an Image
- Changing Brightness and Contrast
- Raster Image Functions: Changing Brightness and Contrast
- Color Halftone and Halftone Images
- Raster Image Functions: Processing an Image
Example
For an example, refer to L_ColorSeparateBitmap.
For complete sample code, refer to the FRAME.C module of the DEMO example.