Interface IResizeSettings
Settings how to resize an image for the src
or srcset
attributes.
It's read only, to create it, use the IImageService
Stores a full configuration for resizing.
This is mainly important for scenarios where you need to build complex rules for the resizer, or for internal functionality when generating images and pictures.
Test
[PublicApi("Still WIP")]
public interface IResizeSettings
Remarks
History: Released 2sxc 13.10
Properties
AspectRatio
The aspect ratio to determine the height, in case no height was specified.
double AspectRatio { get; }
Property Value
BasedOn
Name of the original settings it was based on - can be null/empty.
string BasedOn { get; }
Property Value
Remarks
New v17.03
Factor
The resize factor by which the original value (width/height) is scaled
double Factor { get; }
Property Value
Format
Target format like 'jpg' or 'png'. If empty will not be used.
string Format { get; }
Property Value
Height
Height to resize to. If 0, height will not be changed
int Height { get; }
Property Value
Parameters
Additional url parameters in case the final link would need this. Rarely used, but can be used for resize parameters which are not standard.
NameValueCollection Parameters { get; }
Property Value
Quality
Quality factor for image formats which support quality. Usually a value between 0 and 100. If 0, quality will not be changed.
int Quality { get; }
Property Value
ResizeMode
Resize mode. If empty or "(none)" will not be used.
string ResizeMode { get; }
Property Value
ScaleMode
Scale Mode. If empty or "(none)" will not be used.
string ScaleMode { get; }
Property Value
Width
Width to resize to. If 0, width will not be changed
int Width { get; }