C# Класс Tp.Components.ImageHelper

Показать файл Открыть проект

Открытые методы

Метод Описание
CropImage ( Bitmap bitmap, Rectangle cropRect ) : Bitmap
CropImageToSquare ( Bitmap bitmap ) : Bitmap
GetThumbnail ( Bitmap initImage, int templateWidth, int templateHeight ) : Bitmap
GetThumbnail ( Stream stream, int templateWidth, int templateHeight ) : Bitmap
IsImage ( Stream stream ) : bool
ResizeAndRound ( Bitmap bitmap, int maxWidth, int maxHeight ) : Bitmap
ResizeImage ( Bitmap bitmap, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
ResizeImage ( Stream stream, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
ResizeImageAnyway ( Image image, int width, int height, bool withBorder ) : Bitmap
RoundCorners ( Bitmap startImage, int radious, Color color ) : Bitmap

Приватные методы

Метод Описание
DrawImage ( Bitmap initImage, int templateWidth, int templateHeight, int initWidth, int initHeight ) : Bitmap

Описание методов

CropImage() публичный статический Метод

public static CropImage ( Bitmap bitmap, Rectangle cropRect ) : Bitmap
bitmap System.Drawing.Bitmap
cropRect System.Drawing.Rectangle
Результат System.Drawing.Bitmap

CropImageToSquare() публичный статический Метод

public static CropImageToSquare ( Bitmap bitmap ) : Bitmap
bitmap System.Drawing.Bitmap
Результат System.Drawing.Bitmap

GetThumbnail() публичный статический Метод

public static GetThumbnail ( Bitmap initImage, int templateWidth, int templateHeight ) : Bitmap
initImage System.Drawing.Bitmap
templateWidth int
templateHeight int
Результат System.Drawing.Bitmap

GetThumbnail() публичный статический Метод

public static GetThumbnail ( Stream stream, int templateWidth, int templateHeight ) : Bitmap
stream Stream
templateWidth int
templateHeight int
Результат System.Drawing.Bitmap

IsImage() публичный статический Метод

public static IsImage ( Stream stream ) : bool
stream Stream
Результат bool

ResizeAndRound() публичный статический Метод

public static ResizeAndRound ( Bitmap bitmap, int maxWidth, int maxHeight ) : Bitmap
bitmap System.Drawing.Bitmap
maxWidth int
maxHeight int
Результат System.Drawing.Bitmap

ResizeImage() публичный статический Метод

public static ResizeImage ( Bitmap bitmap, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
bitmap System.Drawing.Bitmap
maxWidth int
maxHeight int
withBorder bool
Результат System.Drawing.Bitmap

ResizeImage() публичный статический Метод

public static ResizeImage ( Stream stream, int maxWidth, int maxHeight, bool withBorder ) : Bitmap
stream Stream
maxWidth int
maxHeight int
withBorder bool
Результат System.Drawing.Bitmap

ResizeImageAnyway() публичный статический Метод

public static ResizeImageAnyway ( Image image, int width, int height, bool withBorder ) : Bitmap
image Image
width int
height int
withBorder bool
Результат System.Drawing.Bitmap

RoundCorners() публичный статический Метод

public static RoundCorners ( Bitmap startImage, int radious, Color color ) : Bitmap
startImage System.Drawing.Bitmap
radious int
color Color
Результат System.Drawing.Bitmap