Image Api

Base Image

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

http://pub-prod-sdk.azurewebsites.net/api/image/3a8b24f3-bf4f-4175-9d0d-a58600faa09e

Resize and Pad

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

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizePad(width: 300, height: 300)

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

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").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("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(width: 300, height: 300)

The position of the crop anchor can also be specified

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(width: 300, height: 300, anchor: AnchorMode.Left)

Resize and Max

The largest image that will fit the aspect ratio

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeMax(width: 300, height: 300)

Resize and Stretch

The image stretched to fit

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeStretch(width: 300, height: 300)

Alpha

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Alpha(alpha: 25)

Brightness

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Brightness(value: 25)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Brightness(value: -25)

Contrast

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Contrast(value: 25)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Contrast(value: -25)

Detect Edges

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).DetectEdges(filter: DetectEdgesFilter.Kayyali)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).DetectEdges(greyscale: true, filter: DetectEdgesFilter.Prewitt)

Filter

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Filter(filter: ImageFilter.Greyscale)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Filter(filter: ImageFilter.Comic)

Flip

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Flip(direction: Flip.Horizontal)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Flip(direction: Flip.Vertical)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Flip(direction: Flip.Both)

Hue

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Hue(hue: 180)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Hue(hue: 180, rotate: true)

Pixelate

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Pixelate(size: 8)

Quality

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Quality(value: 25)

Rotate

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Rotate(angle: 35)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF")

Rounded Corners

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).RoundedCorners(value: 20)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF")

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Rotate(angle: 35, bgcolor: "FFF", tl: false, br: false)

Saturation

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Saturation(value: 25)

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Saturation(value: -25)

Tint

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Tint(color: "purple")

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Tint(color: "C16")

Vignette

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Vignette()

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Vignette(color: "purple")

CoverImage.From("3a8b24f3-bf4f-4175-9d0d-a58600faa09e").ResizeCrop(300, 300).Vignette(color: "C16")