Home COM GDI+ WebBrowser Data Access

IDXLookupTable Interface

 

IID_IDXLookupTable

{01BAFC7F-9E63-11D1-9053-00C04FD9189D}

 

 

The IDXLookupTable interface changes the color balance for a set of samples. Each color in the pixel is used as an index in a table that indicates what the adjusted color value should be.

Remarks

To use lookup tables, you must first create a lookup table with the IDXLUTBuilder interface, which sets the number and order of the operations performed on the samples. To obtain a pointer to a lookup table, you must call the Component Object Model (COM) QueryInterface method on an IDXLUTBuilder object, as shown in the following code example.

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


The pointer returned from this call can be used to obtain the values in the lookup table. It can also be used as a parameter to the IDXSurfaceModifier::SetLookup member function, so that the lookup table can be applied to an entire DXSurface.

You can use lookup tables to adjust an image's brightness or contrast, or to perform gamma correction.

This interface inherits from the IDXBaseObject interface.
 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IDXBaseObject Members

Description

GetGenerationId

Retrieves the current generation ID for the object.

IncrementGenerationId

Manually increments the object generation ID.

GetObjectSize

Retrieves the size, in bytes, of the data object (for example, a surface or buffer).

IDXLookupTable Members

Description

GetTables

Retrieves a copy of the lookup tables.

IsChannelIdentity

Determines whether the application of a channel's table will have any effect.

GetIndexValues

Retrieves the component values for a specific index in the table.

ApplyTables

Translates a set of samples in place.

 

GetTables

 

Note: RedLUT, GreenLUT, BlueLUT and AlphaLUT are pointers to arrays of 256 byte values.

 

FUNCTION IDXLookupTable_GetTables ( _
  BYVAL
pthis AS DWORD PTR _
, BYVAL
RedLUT AS DWORD _
, BYVAL
GreenLUT AS DWORD _
, BYVAL
BlueLUT AS DWORD _
, BYVAL
AlphaLUT AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[6] USING IDXLookupTable_GetTables (pthis, RedLUT, GreenLUT, BlueLUT, AlphaLUT) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

IsChannelIdentity

 

FUNCTION IDXLookupTable_IsChannelIdentity ( _
  BYVAL
pthis AS DWORD PTR _
, BYREF
pSampleBools AS DXBASESAMPLE _
  ) AS LONG

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

END FUNCTION

 

 

GetIndexValues

 

FUNCTION IDXLookupTable_GetIndexValues ( _
  BYVAL
pthis AS DWORD PTR _
, BYVAL
Index AS DWORD _
, BYREF
pSample AS DXBASESAMPLE _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[8] USING IDXLookupTable_GetIndexValues  (pthis, Index, pSample) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION

 

 

ApplyTables

 

FUNCTION IDXLookupTable_ApplyTables ( _
  BYVAL
pthis AS DWORD PTR _
, BYVAL
pSamples AS DWORD _
, BYVAL
cSamples AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[9] USING IDXLookupTable_ApplyTables  (pthis, pSamples, cSamples) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

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