UrlHelper.ThumbUrl Method
- Namespace:
- Weavy.Core.Helpers
- Assembly:
- Weavy.Core.dll
Overloads
Thumb |
Returns an url to a thumbnail image for the specified blob. |
Thumb |
Returns an url to a thumbnail image for the specified embed |
Thumb |
Returns an url to a thumbnail image for the specified entity. |
Thumb |
Returns an url to a composite thumbnail image for the specified files. |
ThumbUrl(Blob, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool)
Returns an url to a thumbnail image for the specified blob.
public static string ThumbUrl(this Blob blob, int? width, int? height, bool retina = true, FitMode fit = FitMode.Fit, ScaleMode scale = ScaleMode.Down, ContentAlignment align, Color? background = default(Color? ), int quality = 90, int opacity = 100, bool ignoreICC = false, bool absolute = false, bool rasterize = false, bool cachebust = true)
Parameters
- blob
- Blob
The blob for which to return a thumbnail url.
- width
- int?
The width constraint.
- height
- int?
The height constraint.
- retina
- bool
If true
, the thumbnail image is created with 2x resolution.
- fit
- FitMode
The constraint mode, determines how to resolve aspect ratio differences between the requested size and the original image's size.
- scale
- ScaleMode
Controls whether the image is allowed to upscale, downscale, both, or if only the canvas gets to be upscaled.
- align
- System.Drawing.ContentAlignment
How to align the image when padding or cropping.
- background
- System.Drawing.Color?
The background color to apply (null
for transparency), white will be used for jpg images when background is unspecified.
- quality
- int
The encoding quality to use (only applies to jpg images).
- opacity
- int
- ignore
ICC - bool
If true
, the ICC profile of the image will be ignored.
- absolute
- bool
true
to generate an absolute url, otherwise false
- rasterize
- bool
- cachebust
- bool
true
to add a cache busting query string parameter, otherwise false
Returns
ThumbUrl(Embed, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool)
Returns an url to a thumbnail image for the specified embed
public static string ThumbUrl(this Embed embed, int? width, int? height, bool retina = true, FitMode fit = FitMode.Fit, ScaleMode scale = ScaleMode.Down, ContentAlignment align, Color? background = default(Color? ), int quality = 90, int opacity = 100, bool ignoreICC = false, bool absolute = false, bool rasterize = false, bool cachebust = true)
Parameters
- embed
- Embed
The blob for which to return a thumbnail url.
- width
- int?
The width constraint.
- height
- int?
The height constraint.
- retina
- bool
If true
, the thumbnail image is created with 2x resolution.
- fit
- FitMode
The constraint mode, determines how to resolve aspect ratio differences between the requested size and the original image's size.
- scale
- ScaleMode
Controls whether the image is allowed to upscale, downscale, both, or if only the canvas gets to be upscaled.
- align
- System.Drawing.ContentAlignment
How to align the image when padding or cropping.
- background
- System.Drawing.Color?
The background color to apply (null
for transparency), white will be used for jpg images when background is unspecified.
- quality
- int
The encoding quality to use (only applies to jpg images).
- opacity
- int
- ignore
ICC - bool
If true
, the ICC profile of the image will be ignored.
- absolute
- bool
true
to generate an absolute url, otherwise false
- rasterize
- bool
- cachebust
- bool
true
to add a cache busting query string parameter, otherwise false
Returns
ThumbUrl(IEntity, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool)
Returns an url to a thumbnail image for the specified entity.
public static string ThumbUrl(this IEntity entity, int? width, int? height, bool retina = true, FitMode fit = FitMode.Fit, ScaleMode scale = ScaleMode.Down, ContentAlignment align, Color? background = default(Color? ), int quality = 90, int opacity = 100, bool ignoreICC = false, bool absolute = false, bool rasterize = false, bool cachebust = true)
Parameters
- entity
- IEntity
The entity for which to return a thumbnail url.
- width
- int?
The width constraint.
- height
- int?
The height constraint.
- retina
- bool
If true
, the thumbnail image is created with 2x resolution.
- fit
- FitMode
The constraint mode, determines how to resolve aspect ratio differences between the requested size and the original image's size.
- scale
- ScaleMode
Controls whether the image is allowed to upscale, downscale, both, or if only the canvas gets to be upscaled.
- align
- System.Drawing.ContentAlignment
How to align the image when padding or cropping.
- background
- System.Drawing.Color?
The background color to apply (null
for transparency), white will be used for jpg images when background is unspecified.
- quality
- int
The encoding quality to use (only applies to jpg images).
- opacity
- int
- ignore
ICC - bool
If true
, the ICC profile of the image will be ignored.
- absolute
- bool
true
to generate an absolute url, otherwise false
- rasterize
- bool
- cachebust
- bool
true
to add a cache busting query string parameter, otherwise false
Returns
ThumbUrl(IEnumerable, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool)
Returns an url to a composite thumbnail image for the specified files.
public static string ThumbUrl(this IEnumerable<File> files, int? width, int? height, bool retina = true, FitMode fit = FitMode.Fit, ScaleMode scale = ScaleMode.Down, ContentAlignment align, Color? background = default(Color? ), int quality = 90, int opacity = 100, bool ignoreICC = false, bool absolute = false, bool rasterize = false, bool cachebust = true)
Parameters
- files
- System.Collections.Generic.IEnumerable
- width
- int?
- height
- int?
- retina
- bool
- fit
- FitMode
- scale
- ScaleMode
- align
- System.Drawing.ContentAlignment
- background
- System.Drawing.Color?
- quality
- int
- opacity
- int
- ignore
ICC - bool
- absolute
- bool
- rasterize
- bool
- cachebust
- bool
true
to add a cache busting query string parameter, otherwise false