Class GetImageSettings
- Namespace
- Dynamicweb.Frontend
- Assembly
- Dynamicweb.dll
Represents the settings for GetImage.ashx link generation.
- Inheritance
-
Get
Image Settings
- Inherited Members
Constructors
GetImageSettings()
Initializes a new instance of the Get
Properties
Crop
Gets or sets the crop mode. The crop mode defines how the image is cropped when resized.
Property Value
Remarks
Default is null
which will translate into Keep
DoNotUpscale
Gets or sets a value indicating whether to upscale the image if the requested size is larger than the original image size.
Property Value
- bool?
true
if upscaling is not allowed; otherwise,false
.
Remarks
Default value is true
.
If crop mode Keep
Format
Gets or sets the image format.
Property Value
- Image
Type The image format of the generated image.
Remarks
Default value is WebP
Height
Gets or sets the desired height of the image.
Property Value
- int?
The height of the image in pixels, or null if the height is not specified.
Quality
Gets or sets the desired quality of the image.
Property Value
- int?
The Quality of the image in a relative value from 1-100, or null if the quality is not specified.
Remarks
webp supports -1 for lossless transformations. Jpg supports 1-100. Recommended value is 65-75. Invalid values are passed directly to GetImage that will report back errors
Ratio
Gets or sets the ratio required of the generated image.
Property Value
- string
The ratio either as a fraction (21/9) or a decimal value (2.33).
Remarks
Use together with Width to calculate height based on the specified ratio. If ratio is set, the crop mode will be set to Center
RatioDefault
Gets or sets the default ratio to be used if no ratio is set on the image.
Property Value
- string
The ratio either as a fraction (21/9) or a decimal value (2.33).
Remarks
If set, it will be used as the ratio when no ratio is set on the image.
Width
Gets or sets the desired width of the image.
Property Value
- int?
The width of the image in pixels, or null if the width is not specified.