Image Api

Base Image

The basic image is called direct from the api if required:

https://app-hes-pubs-prod-neu-01.azurewebsites.net/api/image/69122860-61e7-4487-8f2a-afda00dc996c

Resize and Pad

The image can be resized, but keep the original aspect. The image borders will be padded

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizePad(width: 300, height: 300)

The background colour can be specified, as well as the anchor point for the crop

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizePad(width: 300, height: 300, anchor: AnchorMode.Bottom, bgcolor: "555")

Resize and Cropped

The image can be resized, but cropped so that there are no borders as with the pad version.

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(width: 300, height: 300)

The position of the crop anchor can also be specified

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(width: 300, height: 300, anchor: AnchorMode.Left)

Resize and Max

The largest image that will fit the aspect ratio

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeMax(width: 300, height: 300)

Resize and Stretch

The image stretched to fit

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeStretch(width: 300, height: 300)

Alpha

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Alpha(alpha: 25)

Brightness

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Brightness(value: 25)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Brightness(value: -25)

Contrast

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Contrast(value: 25)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Contrast(value: -25)

Detect Edges

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).DetectEdges(filter: DetectEdgesFilter.Kayyali)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).DetectEdges(greyscale: true, filter: DetectEdgesFilter.Prewitt)

Filter

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Filter(filter: ImageFilter.Greyscale)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Filter(filter: ImageFilter.Comic)

Flip

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Flip(direction: Flip.Horizontal)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Flip(direction: Flip.Vertical)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Flip(direction: Flip.Both)

Hue

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Hue(hue: 180)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Hue(hue: 180, rotate: true)

Pixelate

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Pixelate(size: 8)

Quality

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Quality(value: 25)

Rotate

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Rotate(angle: 35)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF")

Rounded Corners

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).RoundedCorners(value: 20)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF")

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF", tl: false, br: false)

Saturation

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Saturation(value: 25)

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Saturation(value: -25)

Tint

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Tint(color: "purple")

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Tint(color: "C16")

Vignette

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Vignette()

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Vignette(color: "purple")

CoverImage.From("69122860-61e7-4487-8f2a-afda00dc996c").ResizeCrop(300, 300).Vignette(color: "C16")