Class ResizeProcessor
Defines an image resizing operation with the given IResampler and dimensional parameters.
Inherited Members
Namespace: SixLabors.ImageSharp.Processing.Processors.Transforms
Assembly: SixLabors.ImageSharp.dll
Syntax
public class ResizeProcessor : CloningImageProcessor, ICloningImageProcessor, IImageProcessor
Constructors
| Improve this Doc View SourceResizeProcessor(ResizeOptions, Size)
Initializes a new instance of the ResizeProcessor class.
Declaration
public ResizeProcessor(ResizeOptions options, Size sourceSize)
Parameters
Type | Name | Description |
---|---|---|
ResizeOptions | options | The resize options. |
Size | sourceSize | The source image size. |
Properties
| Improve this Doc View SourceCompand
Gets a value indicating whether to compress or expand individual pixel color values on processing.
Declaration
public bool Compand { get; }
Property Value
Type | Description |
---|---|
Boolean |
DestinationHeight
Gets the destination height.
Declaration
public int DestinationHeight { get; }
Property Value
Type | Description |
---|---|
Int32 |
DestinationRectangle
Gets the resize rectangle.
Declaration
public Rectangle DestinationRectangle { get; }
Property Value
Type | Description |
---|---|
Rectangle |
DestinationWidth
Gets the destination width.
Declaration
public int DestinationWidth { get; }
Property Value
Type | Description |
---|---|
Int32 |
PremultiplyAlpha
Gets a value indicating whether to premultiply the alpha (if it exists) during the resize operation.
Declaration
public bool PremultiplyAlpha { get; }
Property Value
Type | Description |
---|---|
Boolean |
Sampler
Gets the sampler to perform the resize operation.
Declaration
public IResampler Sampler { get; }
Property Value
Type | Description |
---|---|
IResampler |
Methods
| Improve this Doc View SourceCreatePixelSpecificCloningProcessor<TPixel>(Configuration, Image<TPixel>, Rectangle)
Creates a pixel specific ICloningImageProcessor<TPixel> that is capable of executing the processing algorithm on an Image<TPixel>.
Declaration
public override ICloningImageProcessor<TPixel> CreatePixelSpecificCloningProcessor<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 |
---|---|
ICloningImageProcessor<TPixel> |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel type. |