C# Class Felbook.Helpers.ImageHelper

显示文件 Open project: janmarek/Felbook Class Usage Examples

Public Methods

Method Description
CalculateSize ( int width, int height, int maxWidth, int maxHeight ) : Dimensions
ImageResize ( System.Web.HttpPostedFileBase file, string filePath, int maximumWidth, int maximumHeight ) : void

Metoda která změní velikost obrázku a rovnou ho uploaduje

IsImage ( string contentType ) : bool
Resize ( Image image, int maxWidth, int maxHeight ) : Image

Method Details

CalculateSize() public static method

public static CalculateSize ( int width, int height, int maxWidth, int maxHeight ) : Dimensions
width int
height int
maxWidth int
maxHeight int
return Dimensions

ImageResize() public method

Metoda která změní velikost obrázku a rovnou ho uploaduje
public ImageResize ( System.Web.HttpPostedFileBase file, string filePath, int maximumWidth, int maximumHeight ) : void
file System.Web.HttpPostedFileBase Fyzicky reprezentovaný soubor
filePath string Cesta k souboru
maximumWidth int Maximální šířka podle které se dyžtak ořízne
maximumHeight int Maximální výška podle které se dyžtak ořízne
return void

IsImage() public static method

public static IsImage ( string contentType ) : bool
contentType string
return bool

Resize() public static method

public static Resize ( Image image, int maxWidth, int maxHeight ) : Image
image Image
maxWidth int
maxHeight int
return Image