ImageGear Professional for Windows ActiveX
BlendWithLUT Method

Description:

Blends two images using Look-Up Tables (LUTs) to determine the strength of each pixel's contribution. The pixel values from dstPage are used as the indexes into the LUTs. Both srcPage and dstPage must be the same bit depth and dimensions. The image in dstPage is destroyed and is replaced with the resulting blend.

For 24-bit images, each channel (R, G, or B) of the dstPage image are processed through their own LUT. For 8-bit images, the lpLUT_red is used and the other two are ignored (you can pass in NULL for these). Each LUT that is to be used must point to an 8-bit LUT that has at least enough entries to process the images being passed in. A 24-bit blend requires 3 LUTs, each having 256 entries. (All three pointers can point to the same LUT.) An 8-bit gray level blend requires a single LUT (lpLUT_red) of 256 entries.

Each entry into the LUT determines the percentage of the blend on a pixel-by-pixel basis. Pixel values of the dstPage image are used as indexes into the array. The LUTs should be initialized with values from 0 to 100, where:

For 8-bit images, the value of each pixel in dstPage is used as the index into the LUT. For 24-bit images, it is the intensity (R+G+B)/3 that is used.

This method takes into account the ROI settings of dstPage object, that are accessible via the IGPage Object.ROI Property. By default ROI is set to the entire image.

Syntax:

      BlendWithLUT (ByVal dstPage As IGPage, ByVal srcPage As IGPage,
ByVal colorChannel As enumIGColorChannels)

Parameters:

Name Description
dstPage Reference to IGPage Object to be blended into.
srcPage Reference to IGPage Object to blend in, must be same size and bit depth.
colorChannel A constant such as IG_COLOR_COMP_R, _G, _B, or _RGB, specifying which color(s) to blend.

Return Value:

N/A

Bits Per Pixel:

Grayscale: 1-16bpc; other color spaces: 1-8bpc.

Sample:

Image Processing and Effects

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback