Class DeliveryApiImageExtensions
Provides extension methods for working with images in the Umbraco Delivery API.
Inheritance
object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Infrastructure.dll
Syntax
public static class DeliveryApiImageExtensions
Methods
View SourceGetImageCrops(ImageCropperValue)
Returns a collection of ImageCrop objects extracted from the specified ImageCropperValue.
Declaration
public static IEnumerable<ImageCrop>? GetImageCrops(this ImageCropperValue imageCropperValue)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageCropperValue | imageCropperValue | The ImageCropperValue instance from which to extract image crops. |
Returns
| Type | Description |
|---|---|
| IEnumerable<ImageCrop> | An System.Collections.Generic.IEnumerable<T> of ImageCrop representing the crops defined in the image cropper value, or |
GetImageFocalPoint(ImageCropperValue)
Gets the focal point of the specified ImageCropperValue if it exists.
Declaration
public static ImageFocalPoint? GetImageFocalPoint(this ImageCropperValue imageCropperValue)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageCropperValue | imageCropperValue | The image cropper value to extract the focal point from. |
Returns
| Type | Description |
|---|---|
| ImageFocalPoint | The ImageFocalPoint if a focal point is defined; otherwise, |