Esempio n. 1
0
 public static string GetCropUrl(
     this IImage image, 
     int? width = null, 
     int? height = null,
     string propertyAlias = Constants.Conventions.Media.File, 
     string cropAlias = null, 
     int? quality = null,
     ImageCropMode? imageCropMode = null, 
     ImageCropAnchor? imageCropAnchor = null, 
     bool preferFocalPoint = false,
     bool useCropDimensions = false, 
     bool cacheBuster = true, 
     string furtherOptions = null,
     ImageCropRatioMode? ratioMode = null, 
     bool upScale = true)
 {
     return image.Content.GetCropUrl(width, height, propertyAlias, cropAlias, quality, imageCropMode, imageCropAnchor, preferFocalPoint, useCropDimensions, cacheBuster, furtherOptions, ratioMode, upScale);
 }
 /// <summary>
 /// Return a crop URL of the image based on the specified parameters.
 /// </summary>
 /// <param name="width">The width of the output image.</param>
 /// <param name="height">The height of the output image.</param>
 /// <param name="propertyAlias">Property alias of the property containing the Json data.</param>
 /// <param name="cropAlias">The crop alias.</param>
 /// <param name="quality">Quality percentage of the output image.</param>
 /// <param name="imageCropMode">The image crop mode.</param>
 /// <param name="imageCropAnchor">The image crop anchor.</param>
 /// <param name="preferFocalPoint">Use focal point, to generate an output image using the focal point instead of the predefined crop.</param>
 /// <param name="useCropDimensions">Use crop dimensions to have the output image sized according to the predefined crop sizes, this will override the width and height parameters.</param>
 /// <param name="cacheBuster">Add a serialised date of the last edit of the item to ensure client cache refresh when updated.</param>
 /// <param name="furtherOptions">The further options.</param>
 /// <param name="ratioMode">Use a dimension as a ratio.</param>
 /// <param name="upScale">If the image should be upscaled to requested dimensions.</param>
 /// <returns>Returns a string with the crop URL.</returns>
 public string GetCropUrl(int? width = null, int? height = null, string propertyAlias = "umbracoFile", string cropAlias = null, int? quality = null, ImageCropMode? imageCropMode = null, ImageCropAnchor? imageCropAnchor = null, bool preferFocalPoint = false, bool useCropDimensions = false, bool cacheBuster = true, string furtherOptions = null, ImageCropRatioMode? ratioMode = null, bool upScale = true) {
     return Image.GetCropUrl(width, height, propertyAlias, cropAlias, quality, imageCropMode, imageCropAnchor, preferFocalPoint, useCropDimensions, cacheBuster, furtherOptions, ratioMode, upScale);
 }