Class ResizeWebProcessor
- Namespace
- SixLabors.ImageSharp.Web.Processors
- Assembly
- SixLabors.ImageSharp.Web.dll
Allows the resizing of images.
public class ResizeWebProcessor : IImageWebProcessor
- Inheritance
-
ResizeWebProcessor
- Implements
- Inherited Members
Fields
Anchor
The command constant for the resize anchor position.
public const string Anchor = "ranchor"
Field Value
Color
The command constant for the resize padding background color.
public const string Color = "rcolor"
Field Value
Compand
The command constant for the resize compand mode.
public const string Compand = "compand"
Field Value
Height
The command constant for the resize height.
public const string Height = "height"
Field Value
Mode
The command constant for the resize mode.
public const string Mode = "rmode"
Field Value
Orient
The command constant for the resize orientation handling mode.
public const string Orient = "orient"
Field Value
Sampler
The command constant for the resize sampler.
public const string Sampler = "rsampler"
Field Value
Width
The command constant for the resize width.
public const string Width = "width"
Field Value
Xy
The command constant for the resize focal point coordinates.
public const string Xy = "rxy"
Field Value
Properties
Commands
Gets the collection of recognized command keys.
public IEnumerable<string> Commands { get; }
Property Value
Methods
Process(FormattedImage, ILogger, CommandCollection, CommandParser, CultureInfo)
Processes the image based on the given commands.
public FormattedImage Process(FormattedImage image, ILogger logger, CommandCollection commands, CommandParser parser, CultureInfo culture)
Parameters
imageFormattedImageThe image to process.
loggerILoggerThe type used for performing logging.
commandsCommandCollectionThe ordered collection containing the processing commands.
parserCommandParserThe command parser use for parting commands.
cultureCultureInfoThe CultureInfo to use as the current parsing culture.
Returns
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.
public bool RequiresTrueColorPixelFormat(CommandCollection commands, CommandParser parser, CultureInfo culture)
Parameters
commandsCommandCollectionThe ordered collection containing the processing commands.
parserCommandParserThe command parser use for parting commands.
cultureCultureInfoThe CultureInfo to use as the current parsing culture.