This project is read-only.

Apply an Filter to an Image

An filter is a class that transforms an image, but does not touch the original image. All filters implement the interface ImageTools.IImageFilter in the main assembly:

public interface IImageFilter
{
   void Apply(ImageBase target, ImageBase source, Rectangle rectangle);
}


To apply one or more filters you can use the method ExtendededImage.ApplyFilters:

IImageFilter myFilter = new Sepia();

ExtendedImage newImage = ExtendedImage.ApplyFilters(myImage, myFilter);


This method loops over all frames of the images, creates a copy of the image and applies to filter. The frames are added to the resulting image object. This is done synchronously and can be time consuming. Use threading to execute this operation in the background.

Similar operations:
ExtendedImage.Resize: Creates a copy of the image with a new size using the specified image resizer.
ExtendedImage.Crop: Creates a copy of the image and cuts the image with the specified rectangle.
ExtendedImage.Transform: Creates a copy of the image by applying transformation like rotation and flipping.

Last edited Jan 4, 2012 at 6:41 AM by malignate88, version 2

Comments

No comments yet.