Method | Description | |
---|---|---|
Crop ( ) : |
Sets the fit mode to Crop
|
|
Dimensions ( int width, int height ) : |
Sets the width and height of the image. Adds whitespace and centers to maintain aspect ratio
|
|
Height ( int height ) : |
Sets the height of the image. Aspect ratio is maintained by default.
|
|
Max ( ) : |
Sets the fit mode to Max - behaves like maxwidth/maxheight
|
|
MaxHeight ( int maxHeight ) : |
Sets the maxiumum height of the image. Maintains aspect ratio but does not add padding.
|
|
MaxWidth ( int maxWidth ) : |
Sets the maxiumum width of the image. Maintains aspect ratio but does not add padding.
|
|
Pad ( ) : |
Sets the fit mode to Pad - adds whitespace to resolve aspect-ratio conflicts
|
|
ScaleBoth ( ) : |
Allows scaling up and down
|
|
ScaleCanvas ( ) : |
Scales the image down and adds a margin to scale up
|
|
ScaleDown ( ) : |
Allows scaling down of the image (default)
|
|
ScaleUp ( ) : |
Allows scaling up of the image
|
|
Stretch ( ) : |
Sets the fit mode to Stretch. Stretches the image, losing aspect ratio
|
|
Width ( int width ) : |
Sets the width of the image. Aspect ratio is maintained by default.
|
|
Zoom ( decimal multiplier ) : |
cale the image by a multiplier. Defaults to 1. 0.5 produces a half-size image, 2 produces a double-size image.
|
Method | Description | |
---|---|---|
ResizeExpression ( |
public Dimensions ( int width, int height ) : |
||
width | int | The desired width in pixels |
height | int | The desired height in pixels |
return |
public Height ( int height ) : |
||
height | int | The desired height in pixels |
return |
public MaxHeight ( int maxHeight ) : |
||
maxHeight | int | |
return |
public MaxWidth ( int maxWidth ) : |
||
maxWidth | int | The desired maxiumum width in pixels |
return |
public Width ( int width ) : |
||
width | int | The desired width in pixels |
return |
public Zoom ( decimal multiplier ) : |
||
multiplier | decimal | |
return |