C# Class ImageResizer.FluentExtensions.ResizeExpression

As expression for configuring image resize options
Inheritance: ImageUrlBuilderExpression
Afficher le fichier Open project: benfoster/ImageResizer.FluentExtensions

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
ResizeExpression ( ImageUrlBuilder builder ) : System

Method Details

Crop() public méthode

Sets the fit mode to Crop
public Crop ( ) : AlignmentExpression
Résultat AlignmentExpression

Dimensions() public méthode

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
Résultat ResizeExpression

Height() public méthode

Sets the height of the image. Aspect ratio is maintained by default.
public Height ( int height ) : ResizeExpression
height int The desired height in pixels
Résultat ResizeExpression

Max() public méthode

Sets the fit mode to Max - behaves like maxwidth/maxheight
public Max ( ) : ResizeExpression
Résultat ResizeExpression

MaxHeight() public méthode

Sets the maxiumum height of the image. Maintains aspect ratio but does not add padding.
public MaxHeight ( int maxHeight ) : ResizeExpression
maxHeight int
Résultat ResizeExpression

MaxWidth() public méthode

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
Résultat ResizeExpression

Pad() public méthode

Sets the fit mode to Pad - adds whitespace to resolve aspect-ratio conflicts
public Pad ( ) : AlignmentExpression
Résultat AlignmentExpression

ScaleBoth() public méthode

Allows scaling up and down
public ScaleBoth ( ) : ResizeExpression
Résultat ResizeExpression

ScaleCanvas() public méthode

Scales the image down and adds a margin to scale up
public ScaleCanvas ( ) : AlignmentExpression
Résultat AlignmentExpression

ScaleDown() public méthode

Allows scaling down of the image (default)
public ScaleDown ( ) : ResizeExpression
Résultat ResizeExpression

ScaleUp() public méthode

Allows scaling up of the image
public ScaleUp ( ) : ResizeExpression
Résultat ResizeExpression

Stretch() public méthode

Sets the fit mode to Stretch. Stretches the image, losing aspect ratio
public Stretch ( ) : ResizeExpression
Résultat ResizeExpression

Width() public méthode

Sets the width of the image. Aspect ratio is maintained by default.
public Width ( int width ) : ResizeExpression
width int The desired width in pixels
Résultat ResizeExpression

Zoom() public méthode

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
Résultat ResizeExpression