C# Класс AForge.Imaging.Filters.BaseTransformationFilter

Base class for filters, which may produce new image of different size as a result of image processing.

The abstract class is the base class for all filters, which do image processing creating new image of the size, which may differ from the size of source image. Filters based on this class cannot be applied directly to the source image, which is kept unchanged.

The base class itself does not define supported pixel formats of source image and resulting pixel formats of destination image. Filters inheriting from this base class, should specify supported pixel formats and their transformations overriding abstract FormatTranslations property.

Наследование: IFilter, IFilterInformation
Показать файл Открыть проект

Открытые методы

Метод Описание
Apply ( Bitmap image ) : Bitmap

Apply filter to an image.

The method keeps the source image unchanged and returns the result of image processing filter as new image.

Apply ( BitmapData imageData ) : Bitmap

Apply filter to an image.

The filter accepts bitmap data as input and returns the result of image processing filter as new image. The source image data are kept unchanged.

Apply ( UnmanagedImage image ) : UnmanagedImage

Apply filter to an image in unmanaged memory.

The method keeps the source image unchanged and returns the result of image processing filter as new image.

Apply ( UnmanagedImage sourceImage, UnmanagedImage destinationImage ) : void

Apply filter to an image in unmanaged memory.

The method keeps the source image unchanged and puts result of image processing into destination image.

The destination image must have the same width and height as source image. Also destination image must have pixel format, which is expected by particular filter (see FormatTranslations property for information about pixel format conversions).

Защищенные методы

Метод Описание
CalculateNewImageSize ( UnmanagedImage sourceData ) : Size

Calculates new image size.

ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void

Process the filter on the specified image.

Приватные методы

Метод Описание
CheckSourceFormat ( PixelFormat pixelFormat ) : void

Описание методов

Apply() публичный метод

Apply filter to an image.
The method keeps the source image unchanged and returns the result of image processing filter as new image.
Unsupported pixel format of the source image.
public Apply ( Bitmap image ) : Bitmap
image System.Drawing.Bitmap Source image to apply filter to.
Результат System.Drawing.Bitmap

Apply() публичный метод

Apply filter to an image.
The filter accepts bitmap data as input and returns the result of image processing filter as new image. The source image data are kept unchanged.
Unsupported pixel format of the source image.
public Apply ( BitmapData imageData ) : Bitmap
imageData System.Drawing.Imaging.BitmapData Source image to apply filter to.
Результат System.Drawing.Bitmap

Apply() публичный метод

Apply filter to an image in unmanaged memory.
The method keeps the source image unchanged and returns the result of image processing filter as new image.
Unsupported pixel format of the source image.
public Apply ( UnmanagedImage image ) : UnmanagedImage
image UnmanagedImage Source image in unmanaged memory to apply filter to.
Результат UnmanagedImage

Apply() публичный метод

Apply filter to an image in unmanaged memory.

The method keeps the source image unchanged and puts result of image processing into destination image.

The destination image must have the same width and height as source image. Also destination image must have pixel format, which is expected by particular filter (see FormatTranslations property for information about pixel format conversions).

Unsupported pixel format of the source image. Incorrect destination pixel format. Destination image has wrong width and/or height.
public Apply ( UnmanagedImage sourceImage, UnmanagedImage destinationImage ) : void
sourceImage UnmanagedImage Source image in unmanaged memory to apply filter to.
destinationImage UnmanagedImage Destination image in unmanaged memory to put result into.
Результат void

CalculateNewImageSize() защищенный абстрактный метод

Calculates new image size.
protected abstract CalculateNewImageSize ( UnmanagedImage sourceData ) : Size
sourceData UnmanagedImage Source image data.
Результат System.Drawing.Size

ProcessFilter() защищенный абстрактный метод

Process the filter on the specified image.
protected abstract ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void
sourceData UnmanagedImage Source image data.
destinationData UnmanagedImage Destination image data.
Результат void