imageComponent.NET - image processing .NET assemblies
Images Composition

PhotoController provides a collection of composition filters, which all inherit from BaseCompositeFilter. These filters have two common properties:

  • BackgroundBitmap
    The other image you want to composite.
  • Position
    The position of the compositing image.

Composition always requires two images. The one encapsulated in the controller is considered as the foreground image; the one loaded in the filter object is considered as the background image. Composition is an operation to merge the color pixel of two images in order to acieve a new image. Not all images can be composited beautifully, it's better to understand how each composite filter works. The following figures demonstrate some of generated result.

First, let's see the two source images we will composite:

the compositing image 1   the compositing image 2

AdditionCompositeFilter

Adds color components to achieve a brightening effect. For example, black color is #000000, which means every color adds a black color is equal to itself. You can see from the result, the image becomes brighter due to the color addition.

addition composite images

DifferenceCompositeFilter

Subtracts either the source image sample color from the background image sample color, or the reverse, depending on which sample has the greater brightness value.

difference composite image

MultiplyCompositeFilter

Multiplies the color component of two input images and creates an output image using the multiplied values.

multiply composite image

LightenCompositeFilter

Creates composite image samples by choosing the lighter samples (either from the source image or the background).

ligthen composite image

DarkenCompositeFilter

Creates composite image samples by choosing the darker samples (from either the source image or the background).

ligthen composite image

ScreenCompositeFilter

Multiplies the inverse of the source image samples with the inverse of the background image samples.

ligthen composite image

ExclusiveCompositeFilter

Produces an effect with a lower contrast difference.

ligthen composite image

SimilarityRemovalFilter

Compares the background image to the source image, if two pixel color are similar (the difference of two colors is less than the threashold), use the source color; otherwise, use the background image color. In this example, the threshold is 0.4

ligthen composite image [Back to Top]
Comments

If you feel this page can be improved or has any mistake, please enter your valuable opinion here. Or if you cannot find the information you are after, feel free to suggest a subject too. I appreciate any voice.

Your Name:
  
Your Email Address:
  
Comments: