ImageGear Professional v18.2 > API Reference Guide > Effects Component API Reference > Effects Component Objects > IGEffectsCtl Control > IGEffectsCtl Methods > AddNoise Method |
Creates noise in the image referenced by pPage object. This can make the image look older. You can control the amount of pixels to be affected as well the strength and the algorithm of the noise alteration. Setting HitRate to 1 indicates that almost every pixel should be affected. A value of 100 would indicate that every 100th pixel should be affected. Setting Strength parameter to 1.0 indicates that a value of about +1 to -1 should be added to those pixels selected while setting Strength to 50.0 would increase the noise result by adding values in the range of -50 to +50. The amount of noise and the pixels to apply it to are selected randomly.
This method takes into account the ROI settings of pPage object, that are accessible via the IGPage Object.ROI Property. By default ROI is set to the entire image.
AddNoise (pPage As IGPage, NoiseMethod As enumIGNoiseMethods,
Strength As Double, HitRate As Long, Sigma As Double,
colorChannel As enumIGColorChannels)
Name | Description |
---|---|
pPage | Reference to IGPage Object for which to add the noise. |
NoiseMethod | Any value of enumIGNoiseMethods Enumeration specifying noise algorithm used for the alteration. |
Strength | Value between 0.0 and 127.0 specifying degree of the noise alteration to be done for the image, i.e., how much pixel's value needs to be altered. |
HitRate | Value between 1 and 500. Use 1 to add noise to all the pixels, use > 1 to skip some pixels. Larger values result in fewer affected pixels. |
Sigma | Value between 0.1 and 25.0 used with IG_NOISE_GAUSSIAN algorithm. |
colorChannel | Any value of enumIGColorChannels Enumeration specifying color channels for which to apply the alteration. |
None
8-bit gray level, 9-16-bit gray level, 24, and 32
Ip_Fx