ILMVColor Interface

Data Types:

COLOR_ATTRIBUTES

typedef struct 
{ 
   BOOL bEnabled; 
   long lBrightness; 
   long lContrast; 
   long lHue; 
   long lSaturation; 
   BOOL bInvert; 
   BOOL bDEnabled; 
   long lDBrightness; 
   long lDContrast; 
   long lDHue; 
   long lDSaturation; 
   BOOL bDInvert; 
} COLOR_ATTRIBUTES; 

Describes color effects.

Member

Description

bEnable

TRUE to enable effects.

lBrightness

The relative lightness or darkness of a color. Value range: -100 to 100.

lContrast

Describes apparent difference in lightness between lighter and darker pixels. Value range: 100 to 100.

lHue

The color reflected from or transmitted through an object. Value range: -180 to 180.

lSaturation

The strength or purity of a color. Value range: 100 to 100.

bInvert

TRUE to invert colors.

bDEnabled

Default enable effects

lDBrightness

Default brightness value.

Original default value is 10.

lDContrast

Default contrast value.

Original default value is 0.

lDHue

Default Hue value.

Original default value is 0.

lDSatuartion

Default Saturation value.

Original default value is 0.

bDInvert

Default Invert value.

Original default value is FALSE.

CROP_ATTRIBUTES

typedef struct 
{ 
   long lLeft; 
   long lTop; 
   long lRight; 
   long lBottom; 
   BOOL bEnabled; 
   long lDLeft; 
   long lDTop; 
   long lDRight; 
   long lDBottom; 
   BOOL bDEnabled; 
} CROP_ATTRIBUTES; 

Describes cropping area.

Member Description
lLeft The left coordinate of the cropped rectangle. The default value is 0.
lTop The top coordinate of the cropped rectangle. The default value is 0.
lRight The right coordinate of the cropped rectangle. The default value is 1.
lBottom The bottom coordinate of the cropped rectangle. The default value is 1.
bEnabled Flag that indicates whether to enable or disable affect area. Possible values are:
  Value Meaning
  TRUE Enable affect area.
  FALSE Disable affect area.
lDLeft Default left.
lDTop Default top.
lDRight Default right.
lDBottom Default bottom.
bDEnabled Default effect area enable status

Interface Methods:

HRESULT GetCropAttributes(CROP_ATTRIBUTES *crop_attributes);

Parameters

crop_attributes a valid pointer to a CROP_ATTRIBUTES structure to be updated with the current effect area attributes.

Description

Retrieves the current effect area attributes.

Returns

S_OK if successful, < 0 if an error occurred.

HRESULT SetCropAttributes(CROP_ATTRIBUTES crop_attributes);

Parameters

crop_attributes a CROP_ATTRIBUTES structure that contains the effect area attributes to set.

Description

Sets the effect area attributes. If successful, effect is applied only to the passed rectangle.

Returns

S_OK if successful, < 0 if an error occurred.

HRESULT IsLEADInputPinConnected()

Parameters

None.

Description

Determines whether the filter input pin is currently connected.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT IsLEADOutputPinConnected()

Parameters

None.

Description

Determines whether the filter output pin is currently connected.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT SetColorAttributes(COLOR_ATTRIBUTES color_attributes)

Parameters

color_attributes

a COLOR_ATTRIBUTES structure that contains color attributes to set.

Description

Sets the color attribute. Attributes are set permanently, cant be canceled, and if the filter is streaming, effect will take place immediately.

Returns

S_OK if successful, S_FALSE otherwise.

HRESULT GetColorAttributes(COLOR_ATTRIBUTES *color_attributes)

Parameters

color_attributes

a valid pointer to a COLOR_ATTRIBUTES structure to be updated with the current settings.

Description

Retrieves the current color attributes.

Returns

S_OK if successful, S_FALSE other wise.

HRESULT GetIODimensions(long *plInWidth, long *plInHeight, long *plOutWidth, long *plOutHeight)

Parameters

plInWidth

A valid pointer to a long variable to be updated with the input media width. NULL can be passed if this value is not needed.

plInHeight

A valid pointer to a long variable to be updated with the input media height. NULL can be passed if this value is not needed.

plOutWidth

A valid pointer to a long variable to be updated with the output media width. NULL can be passed if this value is not needed.

plOutHeight

A valid pointer to a long variable to be updated with the output media height. NULL can be passed if this value is not needed.

Description

Retrieves the current media dimensions.

Returns

S_OK if successful, S_FALSE other wise.

HRESULT GetIOBitCount(int *plInBits, int *plOutBits)

Parameters

pInBitCount

A valid pointer to an integer to be updated with the input media bits per pixel value. NULL can be passed if this value is not needed.

pPBitCount

A valid pointer to an integer to be updated with the output media bits per pixel value. NULL can be passed if this value is not needed.

Description

Gets the bits per pixel of the current connected input and output media formats.

Returns

S_OK if successful, S_FALSE otherwise.

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help