Class EntropyCropProcessor
Defines cropping operation that preserves areas of highest entropy.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Transforms
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class EntropyCropProcessor : IImageProcessor
Constructors
| Improve this Doc View SourceEntropyCropProcessor()
Initializes a new instance of the EntropyCropProcessor class.
Declaration
public EntropyCropProcessor()
EntropyCropProcessor(Single)
Initializes a new instance of the EntropyCropProcessor class.
Declaration
public EntropyCropProcessor(float threshold)
Parameters
Type | Name | Description |
---|---|---|
Single | threshold | The threshold to split the image. Must be between 0 and 1. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
Properties
| Improve this Doc View SourceThreshold
Gets the entropy threshold value.
Declaration
public float Threshold { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceCreatePixelSpecificProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific IImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public IImageProcessor<TPixel> CreatePixelSpecificProcessor<TPixel>(Configuration configuration, Image<TPixel> source, Rectangle sourceRectangle)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration which allows altering default behaviour or extending the library. |
Image<TPixel> | source | The source image. Cannot be null. |
Rectangle | sourceRectangle | The Rectangle structure that specifies the portion of the image object to draw. |
Returns
Type | Description |
---|---|
IImageProcessor<TPixel> |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |