Class ResizeWebProcessor
Allows the resizing of images.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Web.Processors
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public class ResizeWebProcessor : IImageWebProcessor
Fields
| Improve this Doc View SourceAnchor
The command constant for the resize anchor position.
Declaration
public const string Anchor = "ranchor"
Field Value
Type | Description |
---|---|
String |
Color
The command constant for the resize padding background color.
Declaration
public const string Color = "rcolor"
Field Value
Type | Description |
---|---|
String |
Compand
The command constant for the resize compand mode.
Declaration
public const string Compand = "compand"
Field Value
Type | Description |
---|---|
String |
Height
The command constant for the resize height.
Declaration
public const string Height = "height"
Field Value
Type | Description |
---|---|
String |
Mode
The command constant for the resize mode.
Declaration
public const string Mode = "rmode"
Field Value
Type | Description |
---|---|
String |
Orient
The command constant for the resize orientation handling mode.
Declaration
public const string Orient = "orient"
Field Value
Type | Description |
---|---|
String |
Sampler
The command constant for the resize sampler.
Declaration
public const string Sampler = "rsampler"
Field Value
Type | Description |
---|---|
String |
Width
The command constant for the resize width.
Declaration
public const string Width = "width"
Field Value
Type | Description |
---|---|
String |
Xy
The command constant for the resize focal point coordinates.
Declaration
public const string Xy = "rxy"
Field Value
Type | Description |
---|---|
String |
Properties
| Improve this Doc View SourceCommands
Gets the collection of recognized command keys.
Declaration
public IEnumerable<string> Commands { get; }
Property Value
Type | Description |
---|---|
IEnumerable<String> |
Methods
| Improve this Doc View SourceProcess(FormattedImage, ILogger, CommandCollection, CommandParser, CultureInfo)
Processes the image based on the given commands.
Declaration
public FormattedImage Process(FormattedImage image, ILogger logger, CommandCollection commands, CommandParser parser, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
FormattedImage | image | The image to process. |
ILogger | logger | The type used for performing logging. |
CommandCollection | commands | The ordered collection containing the processing commands. |
CommandParser | parser | The command parser use for parting commands. |
CultureInfo | culture | The CultureInfo to use as the current parsing culture. |
Returns
Type | Description |
---|---|
FormattedImage | The FormattedImage. |
RequiresTrueColorPixelFormat(CommandCollection, CommandParser, CultureInfo)
Returns a value indicating whether the image to be processed should be decoded using a 32 bit True Color pixel format - 8 bits per color component plus an 8 bit alpha channel https://en.wikipedia.org/wiki/Color_depth#True_color_(24-bit).
This method is used to determine whether optimizations can be enabled to reduce memory consumption during processing.
Declaration
public bool RequiresTrueColorPixelFormat(CommandCollection commands, CommandParser parser, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
CommandCollection | commands | The ordered collection containing the processing commands. |
CommandParser | parser | The command parser use for parting commands. |
CultureInfo | culture | The CultureInfo to use as the current parsing culture. |
Returns
Type | Description |
---|---|
Boolean | The Boolean indicating whether a 32 bit True Color pixel format is required. |