Image Api

Base Image

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

http://events-prod-sdk.azurewebsites.net/api/image/fd1bb7b9-c983-465c-b5cb-a75a00fe26d5

Resize and Pad

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

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizePad(width: 300, height: 300)

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

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").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.

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(width: 300, height: 300)

The position of the crop anchor can also be specified

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(width: 300, height: 300, anchor: AnchorMode.Left)

Resize and Max

The largest image that will fit the aspect ratio

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeMax(width: 300, height: 300)

Resize and Stretch

The image stretched to fit

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeStretch(width: 300, height: 300)

Alpha

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Alpha(alpha: 25)

Brightness

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Brightness(value: 25)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Brightness(value: -25)

Contrast

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Contrast(value: 25)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Contrast(value: -25)

Detect Edges

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).DetectEdges(filter: DetectEdgesFilter.Kayyali)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).DetectEdges(greyscale: true, filter: DetectEdgesFilter.Prewitt)

Filter

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Filter(filter: ImageFilter.Greyscale)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Filter(filter: ImageFilter.Comic)

Flip

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Flip(direction: Flip.Horizontal)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Flip(direction: Flip.Vertical)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Flip(direction: Flip.Both)

Hue

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Hue(hue: 180)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Hue(hue: 180, rotate: true)

Pixelate

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Pixelate(size: 8)

Quality

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Quality(value: 25)

Rotate

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Rotate(angle: 35)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF")

Rounded Corners

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).RoundedCorners(value: 20)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF")

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF", tl: false, br: false)

Saturation

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Saturation(value: 25)

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Saturation(value: -25)

Tint

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Tint(color: "purple")

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Tint(color: "C16")

Vignette

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Vignette()

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Vignette(color: "purple")

EventImage.From("fd1bb7b9-c983-465c-b5cb-a75a00fe26d5").ResizeCrop(300, 300).Vignette(color: "C16")