Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LBitmap::Multiply
#include "ltwrappr.h"
virtual L_INT LBitmap::Multiply(uFactor, uFlags = 0)
L_UINT uFactor; |
/* multiplication factor */ |
L_UINT32 uFlags; |
/* flags */ |
Increases or decreases the brightness in the bitmap by multiplying the colors in the specified bitmap by a value equal to the uFactor value divided by 100.
Parameter |
Description |
uFactor |
An integer which represents the factor to be used when multiplying image values. The factor used is equal to uFactor/100. |
uFlags |
Reserved for future use. Must be 0. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function is used to increase or decrease the brightness in the bitmap by multiplying the colors in the specified bitmap by a value equal to the uFactor value divided by 100. For Example, if uFactor is 131, the colors in the specified bitmap will be multiplied by 1.31.
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 only in the Document/Medical 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.
This function changes brightness of the image data. If the image has a LUT, the function will work on the LUT, not the image data. If the image has a LUT and you want to work on the image data, set the UseLUT Flag in the BITMAPHANDLE structure to FALSE. Then, after calling the function, reset the UseLUT flag to TRUE as follows:
myBitmap.EnableUseLUT(FALSE);
myBitmap.Multiply(151);
myBitmap.EnableUseLUT(TRUE);
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. |
See Also
Example
L_INT LBitmap__MultiplyExample(LAnimationWindow * pAniWnd) { return pAniWnd->Multiply(80); }