C# Class ImageManager.ResizeUtility

Datei anzeigen Open project: cimex/ImageManager

Public Methods

Method Description
Get ( Image image, int maxSideSize ) : Bitmap
Get ( Image image, int maxWidth, int maxHeight ) : Bitmap
Get ( Image image, int width, int height, ImageMod imageMod, string hexBackgroundColour, AnchorPosition anchor ) : Bitmap
GetAndCrop ( Image image, int targetWidth, int targetHeight, double widthRatio, double heightRatio, double leftRatio, double topRatio ) : Bitmap
GetScaleFactor ( Image image, float maxDimension ) : float

Private Methods

Method Description
Crop ( Image image, int width, int height, AnchorPosition Anchor ) : Bitmap
GetColour ( string hexColour ) : Color
GetDestinationRectangle ( int width, int height, int sourceWidth, int sourceHeight ) : Rectangle
Scale ( Image sourcePhoto, int width, int height, string hexBackgroundColour ) : Bitmap

Method Details

Get() public static method

public static Get ( Image image, int maxSideSize ) : Bitmap
image Image
maxSideSize int
return System.Drawing.Bitmap

Get() public static method

public static Get ( Image image, int maxWidth, int maxHeight ) : Bitmap
image Image
maxWidth int
maxHeight int
return System.Drawing.Bitmap

Get() public static method

public static Get ( Image image, int width, int height, ImageMod imageMod, string hexBackgroundColour, AnchorPosition anchor ) : Bitmap
image Image
width int
height int
imageMod ImageMod
hexBackgroundColour string
anchor AnchorPosition
return System.Drawing.Bitmap

GetAndCrop() public static method

public static GetAndCrop ( Image image, int targetWidth, int targetHeight, double widthRatio, double heightRatio, double leftRatio, double topRatio ) : Bitmap
image Image
targetWidth int
targetHeight int
widthRatio double
heightRatio double
leftRatio double
topRatio double
return System.Drawing.Bitmap

GetScaleFactor() public static method

public static GetScaleFactor ( Image image, float maxDimension ) : float
image Image
maxDimension float
return float