C# Класс ImageResizer.FluentExtensions.ResizeExpression

As expression for configuring image resize options
Наследование: ImageUrlBuilderExpression
Показать файл Открыть проект

Открытые методы

Метод Описание
Crop ( ) : AlignmentExpression

Sets the fit mode to Crop

Dimensions ( int width, int height ) : ResizeExpression

Sets the width and height of the image. Adds whitespace and centers to maintain aspect ratio

Height ( int height ) : ResizeExpression

Sets the height of the image. Aspect ratio is maintained by default.

Max ( ) : ResizeExpression

Sets the fit mode to Max - behaves like maxwidth/maxheight

MaxHeight ( int maxHeight ) : ResizeExpression

Sets the maxiumum height of the image. Maintains aspect ratio but does not add padding.

MaxWidth ( int maxWidth ) : ResizeExpression

Sets the maxiumum width of the image. Maintains aspect ratio but does not add padding.

Pad ( ) : AlignmentExpression

Sets the fit mode to Pad - adds whitespace to resolve aspect-ratio conflicts

ScaleBoth ( ) : ResizeExpression

Allows scaling up and down

ScaleCanvas ( ) : AlignmentExpression

Scales the image down and adds a margin to scale up

ScaleDown ( ) : ResizeExpression

Allows scaling down of the image (default)

ScaleUp ( ) : ResizeExpression

Allows scaling up of the image

Stretch ( ) : ResizeExpression

Sets the fit mode to Stretch. Stretches the image, losing aspect ratio

Width ( int width ) : ResizeExpression

Sets the width of the image. Aspect ratio is maintained by default.

Zoom ( decimal multiplier ) : ResizeExpression

cale the image by a multiplier. Defaults to 1. 0.5 produces a half-size image, 2 produces a double-size image.

Приватные методы

Метод Описание
ResizeExpression ( ImageUrlBuilder builder ) : System

Описание методов

Crop() публичный Метод

Sets the fit mode to Crop
public Crop ( ) : AlignmentExpression
Результат AlignmentExpression

Dimensions() публичный Метод

Sets the width and height of the image. Adds whitespace and centers to maintain aspect ratio
public Dimensions ( int width, int height ) : ResizeExpression
width int The desired width in pixels
height int The desired height in pixels
Результат ResizeExpression

Height() публичный Метод

Sets the height of the image. Aspect ratio is maintained by default.
public Height ( int height ) : ResizeExpression
height int The desired height in pixels
Результат ResizeExpression

Max() публичный Метод

Sets the fit mode to Max - behaves like maxwidth/maxheight
public Max ( ) : ResizeExpression
Результат ResizeExpression

MaxHeight() публичный Метод

Sets the maxiumum height of the image. Maintains aspect ratio but does not add padding.
public MaxHeight ( int maxHeight ) : ResizeExpression
maxHeight int
Результат ResizeExpression

MaxWidth() публичный Метод

Sets the maxiumum width of the image. Maintains aspect ratio but does not add padding.
public MaxWidth ( int maxWidth ) : ResizeExpression
maxWidth int The desired maxiumum width in pixels
Результат ResizeExpression

Pad() публичный Метод

Sets the fit mode to Pad - adds whitespace to resolve aspect-ratio conflicts
public Pad ( ) : AlignmentExpression
Результат AlignmentExpression

ScaleBoth() публичный Метод

Allows scaling up and down
public ScaleBoth ( ) : ResizeExpression
Результат ResizeExpression

ScaleCanvas() публичный Метод

Scales the image down and adds a margin to scale up
public ScaleCanvas ( ) : AlignmentExpression
Результат AlignmentExpression

ScaleDown() публичный Метод

Allows scaling down of the image (default)
public ScaleDown ( ) : ResizeExpression
Результат ResizeExpression

ScaleUp() публичный Метод

Allows scaling up of the image
public ScaleUp ( ) : ResizeExpression
Результат ResizeExpression

Stretch() публичный Метод

Sets the fit mode to Stretch. Stretches the image, losing aspect ratio
public Stretch ( ) : ResizeExpression
Результат ResizeExpression

Width() публичный Метод

Sets the width of the image. Aspect ratio is maintained by default.
public Width ( int width ) : ResizeExpression
width int The desired width in pixels
Результат ResizeExpression

Zoom() публичный Метод

cale the image by a multiplier. Defaults to 1. 0.5 produces a half-size image, 2 produces a double-size image.
public Zoom ( decimal multiplier ) : ResizeExpression
multiplier decimal
Результат ResizeExpression