ImageGear Professional DLL v18.1 for Windows
IG_FX_directional_light
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > FX Functions > IG_FX_directional_light

Glossary Item Box

This function changes the colors of an image according to the pattern of a sine wave.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_FX_directional_light(
        HIGEAR hIGear, 
        AT_FLOAT angle, 
        AT_INT channelCount,
        AT_FLOAT amplitude[], 
        AT_FLOAT frequency, 
        AT_FLOAT phase, 
        AT_FLOAT attenuation
);

Arguments:

Name Type Description
hIGear HIGEAR Image to which to apply direct light effect.
angle AT_FLOAT Direction to apply the effect across the image. The value is specified as an angle in degrees and ranges from 0 to 360.
channelCount AT_INT Specifies the number of channels that should be affected by the transform.
amplitude AT_FLOAT[ ] Controls the magnitude of color adjustment for each channel of the image. The number of elements of the array is typically set to the number of channels in the image. Each value should range from 0 to 2, although higher values are possible. 0 represents no change in the image color. Higher values represent more intense change. Color changes are clipped, so higher values result in a harder edge to the waveform. Array length must be equal to channelCount.
frequency AT_FLOAT Frequency of sine wave. The value should be from 0 to 0.5. The higher the frequency, the more bars will be visible.
phase AT_FLOAT Phase of sine wave. The value should be from 0 to 2*PI (approximately 6.28). As the phase is changed, the alignment of the bars is changed. This can be used to line up the bars with image content or boundaries.
attenuation AT_FLOAT Attenuation of sine wave. The value should be from -0.01 to 0.01. Attenuation adjusts how much the amplitude of the sine wave is decreased or increased as the sine wave proceeds. It can be used to cause the lighting to fade or intensify.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional, except:
Indexed RGB – 1 bpp;
Indexed RGB with non-grayscale palette;
Grayscale – 1 bpp.

Sample:

Image Processing

Remarks:

The image will appear to have regularly spaced bars of light and shadow overlaid on top of it.

©2014. Accusoft Corporation. All Rights Reserved.