ILMVColor Interface

Data Types

COLOR_ATTRIBUTES

Summary

Describes color effects.

Syntax

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; 

Members

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

Summary

Describes cropping area.

Syntax

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

Members

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

Methods

HRESULT GetCropAttributes(CROP_ATTRIBUTES *crop_attributes);

Description

Retrieves the current effect area attributes.

Parameters

crop_attributes

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

Returns

Return Description
S_OK Successful.
< 0 An error occurred.

HRESULT SetCropAttributes(CROP_ATTRIBUTES crop_attributes);

Description

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

Parameters

crop_attributes

A CROP_ATTRIBUTES structure that contains the effect area attributes to set.

Returns

Return Description
S_OK Successful.
< 0 An error occurred.

HRESULT IsLEADInputPinConnected()

Description

Determines whether the filter input pin is currently connected.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT IsLEADOutputPinConnected()

Description

Determines whether the filter output pin is currently connected.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT SetColorAttributes(COLOR_ATTRIBUTES color_attributes)

Description

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

Parameters

color_attributes

A COLOR_ATTRIBUTES structure that contains color attributes to set.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetColorAttributes(COLOR_ATTRIBUTES *color_attributes)

Description

Retrieves the current color attributes.

Parameters

color_attributes

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

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

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

Description

Retrieves the current media dimensions.

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT GetIOBitCount(int *plInBits, int *plOutBits)

Description

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

Parameters

plInBits

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.

plOutBits

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.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.
Help Version 23.0.2024.9.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.