C# Class jQuery_File_Upload.MVC5.Helpers.ImageHandler

Mostra file Open project: TheKalin/jQuery-File-Upload.MVC5 Class Usage Examples

Public Methods

Method Description
GetThumbnailSize ( Image original ) : Size
LoadImage ( string path ) : Bitmap
Save ( Bitmap image, int maxWidth, int maxHeight, int quality, string filePath ) : void

Method to resize, convert and save the image.

Private Methods

Method Description
GetEncoderInfo ( ImageFormat format ) : System.Drawing.Imaging.ImageCodecInfo

Method to get encoder infor for given image format.

Method Details

GetThumbnailSize() public static method

public static GetThumbnailSize ( Image original ) : Size
original Image
return System.Drawing.Size

LoadImage() public static method

public static LoadImage ( string path ) : Bitmap
path string
return System.Drawing.Bitmap

Save() public method

Method to resize, convert and save the image.
public Save ( Bitmap image, int maxWidth, int maxHeight, int quality, string filePath ) : void
image System.Drawing.Bitmap Bitmap image.
maxWidth int resize width.
maxHeight int resize height.
quality int quality setting value.
filePath string file path.
return void