Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LBitmap::Multiply

Show in webframe

#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.

Platforms

Win32, x64.

See Also

Functions:

LBitmap::BricksTexture, LBitmap::Canvas, LBitmap::DisplaceMap, LBitmap::Fragment, LBitmap::Vignette, LBitmap::ChangeIntensity, LBitmap::GammaCorrect, LBitmap::ChangeContrast, LBitmap::HistoContrast, LBitmap::StretchIntensity, LBitmap::RemapIntensity, LBitmap::Invert, LBitmap::ChangeHue, LBitmap::ChangeSaturation, LBitmapBase::Fill, LBitmapBase::GetPixelColor, LBitmapBase::PutPixelColor, LBitmap::GetHistogram, LBitmap::WindowLevel, LBitmap::WindowLevelExt, LDialogImageEffect::DoModalMultiply, LBitmap::AddWeighted

Topics:

Changing Brightness and Contrast

 

Raster Image Functions: Modifying Intensity Values

 

Raster Image Functions: Changing Brightness and Contrast

Example

L_INT LBitmap__MultiplyExample(LAnimationWindow * pAniWnd) 
{
   
   return pAniWnd->Multiply(80); 
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.