Top level object that represents an effect to be applied.
Hierarchy
System.Object
    WebSupergoo.ImageGlue8.Effects
Notes

This class is static. It cannot be instantiated and has only static members.

Methods
Method Description
S» AdjustColors Adjust colors in a bitmap. Pixels are passed to the delegate function left to right, top to bottom until the entire area has been scanned.
S» AutoLevels

AutoLevels automatically adjusts brightness and contrast to produce a balanced image with a good range of color intensities. In doing so it performs a function very much like the Levels effect, automatically deriving settings based on the image provided.

Well defined images span an entire range of color intensities. However it is common to find images that do not. If a photo has been overexposed it will be too bright - there will be few colors at the low ends of intensity and many at the high end. Similarly if a photograph has been underexposed it will be very dark - all the colors will be at the low end of the range and virtually none at the high end.

The AutoLevels effect detects and fixes this kind of imbalance. It scans through the levels of intensity within the image and chooses a level that should be regarded as black (low intensity) and another that should be regarded as white (high intensity). It then stretches the levels in the image so that all the intensities present lie between the black and the white points. This results in an image with a good span of color intensities.

To mitigate the effect of outliers - small numbers of pixels at extreme values of intensity - a clipping percentage is used. By default the value is 0.5% which means that the bottom and top 0.5% of pixels will be ignored when determining the black and white points.

S» Brightness

The Brightness effect can be used to lighten the image or to darken it.

The value given is added to every pixel in the image. The value may be negative in which case the result is to darken rather than lighten the image.

S» Contrast

The Contrast effect can be used to increase or decrease the contrast of an image.

The value given is used to stretch the contrast within the image. Values greater than zero increase the amount of contrast while those less than zero decrease the contrast.

S» Convolution

The Convolution Effect allows you to produce a range of effects by specifying a set of convolution kernels. A simple explanation is given here but you may wish to refer to other sources for complete descriptions of convolution and how you can use it.

Convolution is a general purpose filter effect for images. It works by determining the value of a central pixel by adding the weighted values of all its neighbors together. The weights applied to each pixel are determined by what is called a convolution kernel.

S» Despeckle

The Despeckle filter removes noise from images without blurring edges. It attempts to detect complex areas and leave these intact while smoothing areas where noise will be noticeable.

The Despeckle filter smooths areas in which noise is noticeable while leaving complex areas untouched. The effect is that grain or other noise is reduced without severely affecting edges.

The standard deviation of each pixel and its neighbors is calculated to determine if the area is one of high complexity or low complexity. If the complexity is lower than the threshold then the area is smoothed using a simple mean filter.

S» Equalize

Equalize modifies an image to ensure that all levels of brightness are equally well represented. This function is very similar to the AutoLevels effect but is designed to modify brightness rather than color levels.

S» GaussianBlur

A Gaussian Blur is a general purpose blur filter. This removes fine image detail and noise leaving only larger scale changes. Gaussian Blurs produce a very pure smoothing effect without side effects.

A Gaussian Blur is distinct from other blurs in that it has a well defined effect on different levels of detail within an image. As the level of detail becomes smaller the filter lets through less and less. With other types of blur (e.g. Mean Filter) the amount let through may vary considerably.

As well as having this well defined and consistent frequency response, certain characteristics of the Gaussian function mean that large blurs can be applied much faster than other similar kinds of filters.

S» Histogram

Histogram is a image diagnostic rather than an image effect. When you apply the Histogram effect color levels are calculated and returned via the settings. The image is unaffected.

Image histograms show how color levels are distributed within an image. Each color channel has a value between 0 and 255 and the histogram simply returns the number of pixels with each of these values. A light image will have many values at the higher end of the histogram while a dark one will have many values at the lower end.

S» Invert Invert all the colors in an image.
S» Laplacian

The Laplacian filter is used for detection of edges in an image. It highlights areas in which intensity changes rapidly producing a picture of all the edges in an image.

The Laplacian filter is a standard Laplacian of Gaussian convolution. This is a second derivative function designed to measure changes in intensity without being overly sensitive to noise. The function produces a peak at the start of the change in intensity and then at the end of the change.

Because the Laplacian of Gaussian produces a fairly wide convolution for a small radius this filter can become quite computationally expensive as radius is increased.

S» Levels

The Levels effect allows you fine control over brightness and contrast.

Well defined images span an entire range of color intensities. However it is common to find images that do not. If a photo has been overexposed it will be too bright - there will be few colors at the low ends of intensity and many at the high end. Similarly if a photograph has been underexposed it will be very dark - all the colors will be at the low end of the range and virtually none at the high end.

The Levels effect allows you fine control over brightness and contrast to let you correct this kind of problem. The basic method of adjustment is to set the black and white points on the input image. Normally the black point will be at 0 and the white point at 255. This simply means that black is represented by the value 0 and white is represented by the value 255.

However if an image is too dark there may be no pixels at all with a value of 255. In this case what was white on the original image might be represented by a value of only 200. By setting the white input point to 200 and then applying the effect, the levels in between will be stretched to try and restore balance to the image. A similar operation setting the black input point would apply if an image was too light.

As well as being able to specify input points you can also specify output points. This lets you tell the effect what value should be regarded as white and black on the final output image.

The levels effect is often used in conjunction with an image histogram so that the exact representation of different color levels can be seen in the image.

S» Median

The Median filter smooths images using a fast median algorithm. The median algorithm is particularly good at removing "salt and pepper" noise from images without removing too much fine detail.

The median filter replaces each pixel with the median of its neighbors. The Median has a number of advantages over the Mean. Firstly unrepresentative pixels do not unduly influence the outcome of the final pixel level - this is why the filter is good at removing "salt and pepper" noise. Secondly, because the final pixel must actually be the value of one of its neighbors, edges are preserved more faithfully.

S» Pinch

The Pinch effect distorts the image as if it had been pinched.

The effect distorts the image as if it had been pinched.

S» ReduceColors Reduces the number of colors in the bitmap.
S» Ripple

The Ripple effect distorts the image as if it had been Rippled.

The result is like an image seen through an uneven water surface.

S» SetAlpha Sets the alpha level of the image.
S» Sharpen

The Sharpen filter enhances edges using a simple algorithm. This is very fast to compute but can produce artificially over-sharp or over-noisy images if not used carefully.

The Sharpen Filter uses a simple three square convolution to enhance edges. The value at the center is +2.0 and the value at the edges is -0.125.

S» Twirl

The Twirl effect distorts the image as if it had been Twirled.

The result is like an image that has been twisted.

S» UnsharpMask

The Unsharp Mask filter is a simple method of sharpening a photo. Areas of complexity and fine detail within the image become crisp and better defined. An Unsharp Mask takes longer to perform than a simple Sharpen but gives more control and produces a more natural appearance.

An Unsharp Mask is essentially a Blur in reverse. A Gaussian Blur is applied to a copy of the original image to produce an image with no fine detail. The blurred image is subtracted from the original to extract the fine detail. This fine detail is then added to the original image to highlight complex areas.

The radius parameter determines the radius of the Gaussian Blur in pixels and lets you choose the level of scale of detail that should be enhanced. The difference between color levels on the blurred and original image is determined at each point on the image. If the difference is greater than the Threshold parameter then the Amount percentage of the difference is added back to the original image

S» Wave

The Wave effect distorts the image as if it had been disturbed by a number of random waves.

By choosing appropriate values you can make images look like they are underwater or are being seen through a heat haze.

Example

None.