Home COM GDI+ WebBrowser Data Access

IDXLUTBuilder Interface

 

CLSID_DXLUTBuilder

{1E54333B-2A00-11D1-8198-0000F87557DB}

IID_IDXLUTBuilder

{D26BCE55-E9DC-11d1-9066-00C04FD9189D}

 

 

This interface enables you to construct a lookup table for an input DXSurface. A lookup table is a set of four arrays of 256 numbers each, with one array for each color channel and one array for the alpha channel.

 

Remarks

Each color channel of each sample in an image is modified by a lookup table with the following code:

pBuffer[i].Color = pColorLookupTable[pBuffer[i].Color];

In effect, this color value is used as an index to the modified color value stored in the lookup table array.

There are a number of standard color corrections that you can perform with DirectX Transform lookup tables. These corrections are listed in the OPIDDXLUTBUILDER enumeration. You can also specify any number of color corrections in any order.

To use this interface, call the Component Object Model (COM)CoCreateInstance method as shown in the following code example.

IDXLUTBuilder* g_pLUTBuilder;
hr = CoCreateInstance( CLSID_DXLUTBuilder, NULL, CLSCTX_INPROC,
IID_IDXLUTBuilder, (void **)&g_pLUTBuilder );
...

IDXLookupTable* g_pLUT;
hr = g_pLUTBuilder->QueryInterface( IID_IDXLookupTable,
(void **)&g_pLUT );

When you implement this interface, the call to the QueryInterface method should return an IDXLookupTable pointer. Use this pointer as a parameter to the IDXSurfaceModifier::SetLookup method to connect your lookup table to the DXSurfaceModifier object.
 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IDXLUTBuilder Members

Description

GetNumBuildSteps

Retrieves the number of lookup table operations to perform.

GetBuildOrder

Retrieves the order of operations used to build the lookup table.

SetBuildOrder

Sets the order of operations used to build the lookup table.

SetGamma

Sets the value used for gamma correction.

GetGamma

Retrieves the value used for gamma correction.

GetOpacity

Retrieves the opacity adjustment for the lookup table.

SetOpacity

Sets the opacity adjustment for the lookup table.

GetBrightness

Retrieves the settings for the lookup table brightness curve.

SetBrightness

Sets the values for the lookup table brightness curve.

GetContrast

Retrieves the settings for the lookup table contrast curve.

SetContrast

Sets the values for the lookup table contrast curve.

GetColorBalance

Retrieves the tint curves used for color balance operations on the selected color.

SetColorBalance

Sets the tint curves for color balance operations on the selected color.

GetLevelsPerChannel

Retrieves the number of color levels to use for the posterizing operation.

SetLevelsPerChannel

Sets the number of color levels to use for the posterizing operation.

GetInvert

Retrieves the threshold value used for color inversion.

SetInvert

Sets the threshold value for color inversion.

GetTreshold

Retrieves the value used for threshold filtering operations.

SetTreshold

Sets the value for threshold filtering operations.

 

GetNumBuildSteps

 

FUNCTION IDXLUTBuilder_GetNumBuildSteps ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pulNumSteps AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[3] USING IDXLUTBuilder_GetNumBuildSteps (pthis, pulNumSteps) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetBuildOrder

 

FUNCTION IDXLUTBuilder_GetBuildOrder ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF OpOrder AS LONG _

, BYVAL ulSize AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[4] USING IDXLUTBuilder_GetBuildOrder (pthis, OpOrder, ulSize) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetBuildOrder

 

FUNCTION IDXLUTBuilder_SetBuildOrder ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL OpOrder AS LONG _

, BYVAL ulNumSteps AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[5] USING IDXLUTBuilder_SetBuildOrder (pthis, OpOrder, ulNumSteps) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetGamma

 

FUNCTION IDXLUTBuilder_SetGamma ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL newVal AS SINGLE _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[6] USING IDXLUTBuilder_SetGamma (pthis, newVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetGamma

 

FUNCTION IDXLUTBuilder_GetGamma ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pVal AS SINGLE _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[7] USING IDXLUTBuilder_GetGamma (pthis, pVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetOpacity

 

FUNCTION IDXLUTBuilder_GetOpacity ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pVal AS SINGLE _

  ) AS LONG


  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[8] USING IDXLUTBuilder_GetOpacity (pthis, pVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetOpacity

 

FUNCTION IDXLUTBuilder_SetOpacity ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL newVal AS SINGLE _

  ) AS LONG


  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[9] USING IDXLUTBuilder_SetOpacity (pthis, newVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetBrightness

 

FUNCTION IDXLUTBuilder_GetBrightness ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pulCount AS DWORD _

, BYREF Weights AS DWORD _

  ) AS LONG


  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[10] USING IDXLUTBuilder_GetBrightness (pthis, pulCount, Weights) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetBrightness

 

FUNCTION IDXLUTBuilder_SetBrightness ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL ulCount AS DWORD _

, BYVAL Weights AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[11] USING IDXLUTBuilder_SetBrightness (pthis, ulCount, Weights) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetContrast

 

FUNCTION IDXLUTBuilder_GetContrast ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pulCount AS DWORD _

, BYREF Weights AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[12] USING IDXLUTBuilder_GetContrast (pthis, pulCount, Weights) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetContrast

 

FUNCTION IDXLUTBuilder_SetContrast ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL ulCount AS DWORD _

, BYVAL Weights AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[13] USING IDXLUTBuilder_SetContrast (pthis, ulCount, Weights) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetColorBalance

 

FUNCTION IDXLUTBuilder_GetColorBalance ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL prmColor AS LONG _

, BYREF pulCount AS DWORD _

, BYREF Weights AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[14] USING IDXLUTBuilder_GetColorBalance (pthis, prmColor, pulCount, Weights) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetColorBalance

 

FUNCTION IDXLUTBuilder_SetColorBalance ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL prmColor AS LONG _

, BYVAL ulCount AS DWORD _

, BYVAL Weights AS DWORD _

  ) AS LONG


  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[15] USING IDXLUTBuilder_SetColorBalance (pthis, prmColor, ulCount, Weights) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetLevelsPerChannel

 

FUNCTION IDXLUTBuilder_GetLevelsPerChannel ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pVal AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[16] USING IDXLUTBuilder_GetLevelsPerChannel (pthis, pVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetLevelsPerChannel

 

FUNCTION IDXLUTBuilder_SetLevelsPerChannel ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL newVal AS DWORD _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[17] USING IDXLUTBuilder_SetLevelsPerChannel (pthis, newVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetInvert

 

FUNCTION IDXLUTBuilder_GetInvert ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pThreshold AS SINGLE _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[18] USING IDXLUTBuilder_GetInvert (pthis, pThreshold) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetInvert

 

FUNCTION IDXLUTBuilder_SetInvert ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL Threshold AS SINGLE _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[19] USING IDXLUTBuilder_SetInvert (pthis, Threshold) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetTreshold

 

FUNCTION IDXLUTBuilder_GetThreshold ( _
  BYVAL
pthis AS DWORD PTR _

, BYREF pVal AS SINGLE _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[20] USING IDXLUTBuilder_GetThreshold (pthis, pVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetTreshold

 

FUNCTION IDXLUTBuilder_SetThreshold ( _
  BYVAL
pthis AS DWORD PTR _

, BYVAL newVal AS SINGLE _

  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[21] USING IDXLUTBuilder_SetThreshold (pthis, newVal) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

Page last updated on Monday, 03 April 2006 19:47:58 +0200