Class ThumbnailUtil
Inheritance
System.Object
ThumbnailUtil
Implements
Namespace: ImageVault.EPiServer
Assembly: ImageVault.EPiServer.dll
Syntax
public class ThumbnailUtil : Object, IThumbnailUtil
Constructors
ThumbnailUtil(IClientFactory, ILogger<ThumbnailUtil>, IMediaFormatUtil, ScriptHelperBase, Int32, Int32, ResizeMode)
Initializes a new instance of the ThumbnailFormatUtil class.
Declaration
public ThumbnailUtil(IClientFactory clientFactory, ILogger<ThumbnailUtil> logger, IMediaFormatUtil mediaFormatUtil, ScriptHelperBase scriptHelper, int defaultWidth = 558, int defaultHeight = 398, ResizeMode defaultResizeMode)
Parameters
Type | Name | Description |
---|---|---|
IClientFactory | clientFactory | |
Microsoft.Extensions.Logging.ILogger<ThumbnailUtil> | logger | |
IMediaFormatUtil | mediaFormatUtil | |
ScriptHelperBase | scriptHelper | |
System.Int32 | defaultWidth | |
System.Int32 | defaultHeight | |
ResizeMode | defaultResizeMode |
Fields
DefaultChannelHeight
Default channel thumbnail height, double size for retina
Declaration
public const int DefaultChannelHeight = 280
Field Value
Type | Description |
---|---|
System.Int32 |
DefaultChannelWidth
Default channel thumbnail width, double size for retina
Declaration
public const int DefaultChannelWidth = 280
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
DefaultFormat
Gets the Default Format of the Thumbnail
Declaration
public ThumbnailFormat DefaultFormat { get; }
Property Value
Type | Description |
---|---|
ThumbnailFormat |
DefaultHeight
Gets the default height of the Thumbnail
Declaration
public int DefaultHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
DefaultResizeMode
Gets the Default Resize Mode of the thumbnail
Declaration
public ResizeMode DefaultResizeMode { get; }
Property Value
Type | Description |
---|---|
ResizeMode |
DefaultWidth
Gets the default width of the Thumbnail
Declaration
public int DefaultWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
GetThumbnailFormat(MediaReference, PropertyMediaSettings, DisplayChannelSetting)
Gets the thumbnail format suitable for the supplied value and settings
Declaration
public ThumbnailFormat GetThumbnailFormat(MediaReference value, PropertyMediaSettings currentSettings, DisplayChannelSetting displayChannelSetting = null)
Parameters
Type | Name | Description |
---|---|---|
MediaReference | value | The MediaReference containing the effects for the item or null if no effects should be considered |
PropertyMediaSettings | currentSettings | The PropertyMediaSettings to use |
DisplayChannelSetting | displayChannelSetting |
Returns
Type | Description |
---|---|
ThumbnailFormat |
RenderThumbnails(MediaReference, String, PropertyMediaSettings, DisplayChannelSetting)
Declaration
public string RenderThumbnails(MediaReference value, string thumbnailCache, PropertyMediaSettings propertyMediaSettings, DisplayChannelSetting displayChannelSetting)
Parameters
Type | Name | Description |
---|---|---|
MediaReference | value | |
System.String | thumbnailCache | |
PropertyMediaSettings | propertyMediaSettings | |
DisplayChannelSetting | displayChannelSetting |
Returns
Type | Description |
---|---|
System.String |