C# 클래스 Accord.Imaging.Filters.Crop

Crop an image.

The filter crops an image providing a new image, which contains only the specified rectangle of the original image.

The filter accepts 8 and 16 bpp grayscale images and 24, 32, 48 and 64 bpp color images for processing.

Sample usage:

// create filter Crop filter = new Crop( new Rectangle( 75, 75, 320, 240 ) ); // apply the filter Bitmap newImage = filter.Apply( image );

Initial image:

Result image:

상속: BaseTransformationFilter
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

공개 메소드들

메소드 설명
Crop ( Rectangle rect ) : System

Initializes a new instance of the Crop class.

보호된 메소드들

메소드 설명
CalculateNewImageSize ( UnmanagedImage sourceData ) : Size

Calculates new image size.

ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void

Process the filter on the specified image.

메소드 상세

CalculateNewImageSize() 보호된 메소드

Calculates new image size.
protected CalculateNewImageSize ( UnmanagedImage sourceData ) : Size
sourceData UnmanagedImage Source image data.
리턴 System.Drawing.Size

Crop() 공개 메소드

Initializes a new instance of the Crop class.
public Crop ( Rectangle rect ) : System
rect System.Drawing.Rectangle Rectangle to crop.
리턴 System

ProcessFilter() 보호된 메소드

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void
sourceData UnmanagedImage Source image data.
destinationData UnmanagedImage Destination image data.
리턴 void